at.dms.kjc.sir.lowering
Class CollapseDataParallelism

java.lang.Object
  extended by at.dms.kjc.sir.lowering.CollapseDataParallelism

public class CollapseDataParallelism
extends Object

OVERVIEW ---------------------------------------------------- The goal of this class is to identify big splitjoins of data-parallel components that can be collapsed to a single filter, WITHOUT duplicating any code. This is very different from our fusion algorithms because the resulting code size is comparable to one of the original filters, rather than being the sum of the original filters. This class does not really "remove" data parallelism, because the collapsed filter is stateless and can be fissed again using StatelessDuplicate. The reasons for collapsing it first are to: 1. Reduce code size (and possibly execution time) on a uniprocessor 2. To avoid fusing-then-fissing when adjusting a big SJ width to the right size on a parallel target NOTE that this class has an unusual calling pattern. It must be called once before ConstructSIRTree (when arguments are still available) and again afterwards. Thus there are two separate public functions. DETAILS ------------------------------------------------------ The transformation currently applies to splitjoins whos children are all: - filters - no TwoStageFilters - no peeking - no mutable state (and isFissable()) - static I/O rates - same name (getIdent()) - exactly the same int/float-literal arguments are passed to all filters (*) Bullet (*) indicates that no messages come out of these filters. Also, no messages come in because such filters are already unfissable (they would mutate state, or messages would be no-ops).


Field Summary
static boolean ENABLED
          Whether or not this pass is enabled.
 
Constructor Summary
CollapseDataParallelism()
          Construct one each time you do a call to detectEligible / doTransformations.
 
Method Summary
 void detectEligible(SIRStream str)
          Keeps track of all splitjoins contained within 'str' that are eligible for the transformation.
 void doTransformations(SIRStream str)
          Actually performs the transformation on all eligible splitjoins within 'str'.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ENABLED

public static final boolean ENABLED
Whether or not this pass is enabled.

Constructor Detail

CollapseDataParallelism

public CollapseDataParallelism()
Construct one each time you do a call to detectEligible / doTransformations.

Method Detail

detectEligible

public void detectEligible(SIRStream str)
Keeps track of all splitjoins contained within 'str' that are eligible for the transformation. Should be called *BEFORE* ConstructSIRTree.


doTransformations

public void doTransformations(SIRStream str)
Actually performs the transformation on all eligible splitjoins within 'str'. Should be called *AFTER* ConstructSIRTree, and also *AFTER* 'detectEligible'.