at.dms.backend
Class DeadcodeElimination

java.lang.Object
  |
  +--at.dms.backend.TreeWalker
        |
        +--at.dms.backend.DeadcodeElimination

public class DeadcodeElimination
extends TreeWalker

This class removes deadcode generated by optimizations or code transformation.


Constructor Summary
DeadcodeElimination(BasicBlock[] bblocks, BasicBlock[] eblocks)
          Creates a new instruction handle.
 
Method Summary
protected  void kill()
          Called when a branch is reached.
protected  void processNode(QNode node)
          Processes the node.
 void run()
          Runs the deadcode algorithm.
 
Methods inherited from class at.dms.backend.TreeWalker
getBasicBlock, removeNode, traverse
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeadcodeElimination

public DeadcodeElimination(BasicBlock[] bblocks,
                           BasicBlock[] eblocks)
Creates a new instruction handle.
Parameters:
instruction - The instruction
prev - The handle of the next instruction in textual order.
Method Detail

run

public void run()
Runs the deadcode algorithm.

processNode

protected void processNode(QNode node)
Description copied from class: TreeWalker
Processes the node.
Overrides:
processNode in class TreeWalker
Following copied from class: at.dms.backend.TreeWalker
Parameters:
node - The node to be processed.

kill

protected void kill()
Description copied from class: TreeWalker
Called when a branch is reached.
Overrides:
kill in class TreeWalker