at.dms.kjc.sir.lowering
Class EnqueueToInitPath

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

public class EnqueueToInitPath
extends Object

Create initPath() functions for feedback loops that don't have them. Looks for feedback loops that don't have any initPath() function. If so, searches the init function for enqueue statements, and uses those to build an appropriate initPath() function. This pass must be run after constant propagation and loop unrolling, and assumes that enqueue statements are outside of any control flow.

Version:
$Id: EnqueueToInitPath.java,v 1.7 2007/02/23 19:42:08 dimock Exp $
Author:
David Maze <dmaze@cag.lcs.mit.edu>

Constructor Summary
EnqueueToInitPath()
           
 
Method Summary
static void doInitPath(SIRStream str)
          Recursively search for and transform feedback loops.
static void doRewrite(SIRFeedbackLoop self)
          Do the initPath transformation for a single feedback loop.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnqueueToInitPath

public EnqueueToInitPath()
Method Detail

doInitPath

public static void doInitPath(SIRStream str)
Recursively search for and transform feedback loops.

Parameters:
str - SIR stream to search

doRewrite

public static void doRewrite(SIRFeedbackLoop self)
Do the initPath transformation for a single feedback loop.

Parameters:
self - SIR feedback loop to rewrite