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

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

public class FusePipe
extends Object

This is the high-level fusion class for pipelines. It dispatches to another class (e.g., FusePipeShift, FusePipeModulo) for actually performing the fusion. This class deals with the interface, the legality of fusion, and patching the fusion product into the parent stream graph.


Field Summary
static boolean debugging
          enable / disable debuging printouts.
static String INIT_WORK_NAME
          Name of init work, fused across fusion and fission.
 
Constructor Summary
FusePipe()
           
 
Method Summary
static void fuse(SIRFilter first, SIRFilter last)
           
static int fuse(SIRPipeline pipe)
          Fuses all eligibles portions of , returning the number of filters eliminated.
static int fuse(SIRPipeline pipe, int targetElim)
          Fuses all candidate portions of , given that the caller would prefer not to eliminate more than filters from .
static SIRStream fuse(SIRPipeline pipe, PartitionGroup partitions)
          Fuses sections of according to , which specifies the grouping sequence of who gets fused together.
static int fuseTwo(SIRPipeline pipe, int start)
          Fuses two filters starting from in , returning 1 if they were fused and 0 otherwise.
static String getFusedName(List<SIRStream> filterInfo)
          Return a name for the fused filter that consists of those filters in .
static boolean isFusable(SIRStream str)
          Returns whether or note str is a candidate component for fusion.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INIT_WORK_NAME

public static final String INIT_WORK_NAME
Name of init work, fused across fusion and fission.

See Also:
Constant Field Values

debugging

public static boolean debugging
enable / disable debuging printouts.

Constructor Detail

FusePipe

public FusePipe()
Method Detail

fuse

public static int fuse(SIRPipeline pipe)
Fuses all eligibles portions of , returning the number of filters eliminated.


fuse

public static int fuse(SIRPipeline pipe,
                       int targetElim)
Fuses all candidate portions of , given that the caller would prefer not to eliminate more than filters from . The fusion does its best to respect this constraint (in a greedy way for now), but it will error on the side of eliminating MORE than instead of eliminating fewer.


fuse

public static SIRStream fuse(SIRPipeline pipe,
                             PartitionGroup partitions)
Fuses sections of according to , which specifies the grouping sequence of who gets fused together.


fuseTwo

public static int fuseTwo(SIRPipeline pipe,
                          int start)
Fuses two filters starting from in , returning 1 if they were fused and 0 otherwise.


fuse

public static void fuse(SIRFilter first,
                        SIRFilter last)

isFusable

public static boolean isFusable(SIRStream str)
Returns whether or note str is a candidate component for fusion. XXX: the current implementation only identifies fusable filters and rejects fusable containers. XXX: the calls from FuseSimpleSlit and FuseSplit are suspect.


getFusedName

public static String getFusedName(List<SIRStream> filterInfo)
Return a name for the fused filter that consists of those filters in . must be a list of either SIRFilter's or FilterInfo's.