at.dms.kjc.sir.lowering
Class DeadCodeElimination

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

public class DeadCodeElimination
extends Object

Removes what dead code we can detect within a filter. For local variables only, don't remove volatile variables. Note: uses a set of variables in the calculation, so requires identical hash codes for JVariableDefinition's for the declaration and all uses. Since Java uses identity-based hash codes by default, this means that the same JVariableDefinitionmust be used for the declaration and all uses.


Constructor Summary
DeadCodeElimination()
           
 
Method Summary
static void doit(SIRCodeUnit unit)
           
static void removeDeadLocalDecls(SIRCodeUnit unit)
          Removes local variables that are never referenced.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeadCodeElimination

public DeadCodeElimination()
Method Detail

doit

public static void doit(SIRCodeUnit unit)

removeDeadLocalDecls

public static void removeDeadLocalDecls(SIRCodeUnit unit)
Removes local variables that are never referenced.