at.dms.kjc.sir.lowering
Class ConstantProp

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

public class ConstantProp
extends Object

This class propagates constants and unrolls loops. Currently only works for init functions. (Bill Thies & Allyn Dimock: 2005-12-22 now works for all SIRStreams.)


Method Summary
static void propagateAndUnroll(SIRStream str)
          Propagates constants as far as possible in and also unrolls loops.
static void propagateAndUnroll(SIRStream str, boolean removeDeadFields)
          Propagates constants as far as possible in and also unrolls loops.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

propagateAndUnroll

public static void propagateAndUnroll(SIRStream str)
Propagates constants as far as possible in and also unrolls loops.

Parameters:
str - a SIRStream. Propagation occurs in this and all reachable.

propagateAndUnroll

public static void propagateAndUnroll(SIRStream str,
                                      boolean removeDeadFields)
Propagates constants as far as possible in and also unrolls loops.

Parameters:
str - a SIRStream. Propagation occurs in this and all reachable.
removeDeadFields - whether FieldProp should remove fully-propagated fields.