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

java.lang.Object
  extended by at.dms.kjc.sir.lowering.fusion.FuseAll
All Implemented Interfaces:
StreamVisitor

public class FuseAll
extends Object
implements StreamVisitor

This class fuses all the pipelines that it can in a stream graph. We need to fuse all the children of the current stream we're visiting (rather than the stream itself) so that the iterators don't get confused.


Method Summary
static SIRPipeline fuse(SIRStream str)
          As above, with strict=true.
static SIRPipeline fuse(SIRStream str, boolean strict)
          Fuse everything we can in .
 void postVisitFeedbackLoop(SIRFeedbackLoop self, SIRFeedbackLoopIter iter)
           
 void postVisitPipeline(SIRPipeline self, SIRPipelineIter iter)
          POST-VISITS
 void postVisitSplitJoin(SIRSplitJoin self, SIRSplitJoinIter iter)
           
 void preVisitFeedbackLoop(SIRFeedbackLoop self, SIRFeedbackLoopIter iter)
           
 void preVisitPipeline(SIRPipeline self, SIRPipelineIter iter)
          PRE-VISITS
 void preVisitSplitJoin(SIRSplitJoin self, SIRSplitJoinIter iter)
           
 void visitFilter(SIRFilter self, SIRFilterIter iter)
          PLAIN-VISITS
 void visitPhasedFilter(SIRPhasedFilter self, SIRPhasedFilterIter iter)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

fuse

public static SIRPipeline fuse(SIRStream str,
                               boolean strict)
Fuse everything we can in . Returns new fused segment, which is also mutated in the stream graph. If 'strict' is true, then prints an error message and exits if it can't succeed in fusing down to 1 filter; otherwise it just does its best (i.e., with respect to feedbackloops).


fuse

public static SIRPipeline fuse(SIRStream str)
As above, with strict=true.


visitFilter

public void visitFilter(SIRFilter self,
                        SIRFilterIter iter)
PLAIN-VISITS

Specified by:
visitFilter in interface StreamVisitor

visitPhasedFilter

public void visitPhasedFilter(SIRPhasedFilter self,
                              SIRPhasedFilterIter iter)
Specified by:
visitPhasedFilter in interface StreamVisitor

preVisitPipeline

public void preVisitPipeline(SIRPipeline self,
                             SIRPipelineIter iter)
PRE-VISITS

Specified by:
preVisitPipeline in interface StreamVisitor

preVisitSplitJoin

public void preVisitSplitJoin(SIRSplitJoin self,
                              SIRSplitJoinIter iter)
Specified by:
preVisitSplitJoin in interface StreamVisitor

preVisitFeedbackLoop

public void preVisitFeedbackLoop(SIRFeedbackLoop self,
                                 SIRFeedbackLoopIter iter)
Specified by:
preVisitFeedbackLoop in interface StreamVisitor

postVisitPipeline

public void postVisitPipeline(SIRPipeline self,
                              SIRPipelineIter iter)
POST-VISITS

Specified by:
postVisitPipeline in interface StreamVisitor

postVisitSplitJoin

public void postVisitSplitJoin(SIRSplitJoin self,
                               SIRSplitJoinIter iter)
Specified by:
postVisitSplitJoin in interface StreamVisitor

postVisitFeedbackLoop

public void postVisitFeedbackLoop(SIRFeedbackLoop self,
                                  SIRFeedbackLoopIter iter)
Specified by:
postVisitFeedbackLoop in interface StreamVisitor