at.dms.kjc.sir.lowering.fusion
Class FuseSplit

java.lang.Object
  extended by at.dms.kjc.sir.lowering.fusion.FuseSplit

public class FuseSplit
extends Object

This flattens any set of filters into a single splitjoin.


Constructor Summary
FuseSplit()
           
 
Method Summary
static SIRStream fuse(SIRSplitJoin sj)
          Returns result of fusion, which might be mutated version of if it could fuse without creating fresh construct.
static SIRStream fuse(SIRSplitJoin sj, PartitionGroup partition)
           
static SIRStream getLastFused()
           
static boolean isFusable(SIRSplitJoin sj)
          Returns whether or not is fusable.
protected static JExpression makeBufferPeek(at.dms.kjc.sir.lowering.fusion.FuseSplit.BufferInfo buffer, JExpression offset)
          Generates an expression that gives the value at offset in .
protected static JExpression makeBufferPop(at.dms.kjc.sir.lowering.fusion.FuseSplit.BufferInfo buffer)
          Generates a pop expression that gives the next value in , also incrementing the internal read index.
protected static JAssignmentExpression makeBufferPush(at.dms.kjc.sir.lowering.fusion.FuseSplit.BufferInfo buffer, JExpression val)
          Generates a push of to .
static SIRStream semiFuse(SIRSplitJoin sj)
          Fuses half the children of together instead of fusing the entire construct.
static int SPLITTER_JOINER_LOOP_THRESHOLD()
          The number statements in an unrolled piece of code for a splitter or joiner before it is put in a loop instead of being unrolled.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FuseSplit

public FuseSplit()
Method Detail

SPLITTER_JOINER_LOOP_THRESHOLD

public static final int SPLITTER_JOINER_LOOP_THRESHOLD()
The number statements in an unrolled piece of code for a splitter or joiner before it is put in a loop instead of being unrolled.


semiFuse

public static SIRStream semiFuse(SIRSplitJoin sj)
Fuses half the children of together instead of fusing the entire construct. Returns result, which might be mutated version of if it could fuse without creating fresh construct.


fuse

public static SIRStream fuse(SIRSplitJoin sj,
                             PartitionGroup partition)

getLastFused

public static SIRStream getLastFused()

fuse

public static SIRStream fuse(SIRSplitJoin sj)
Returns result of fusion, which might be mutated version of if it could fuse without creating fresh construct.


isFusable

public static boolean isFusable(SIRSplitJoin sj)
Returns whether or not is fusable.


makeBufferPush

protected static JAssignmentExpression makeBufferPush(at.dms.kjc.sir.lowering.fusion.FuseSplit.BufferInfo buffer,
                                                      JExpression val)
Generates a push of to .


makeBufferPop

protected static JExpression makeBufferPop(at.dms.kjc.sir.lowering.fusion.FuseSplit.BufferInfo buffer)
Generates a pop expression that gives the next value in , also incrementing the internal read index.


makeBufferPeek

protected static JExpression makeBufferPeek(at.dms.kjc.sir.lowering.fusion.FuseSplit.BufferInfo buffer,
                                            JExpression offset)
Generates an expression that gives the value at offset in .