com.ibm.wala.cfg
Class InducedCFG.BranchVisitor

java.lang.Object
  extended by com.ibm.wala.ssa.SSAInstruction.Visitor
      extended by com.ibm.wala.cfg.InducedCFG.BranchVisitor
All Implemented Interfaces:
SSAInstruction.IVisitor
Direct Known Subclasses:
AstInducedCFG.AstBranchVisitor
Enclosing class:
InducedCFG

public class InducedCFG.BranchVisitor
extends SSAInstruction.Visitor

This visitor identifies basic block boundaries induced by branch instructions.


Constructor Summary
protected InducedCFG.BranchVisitor(boolean[] r)
           
 
Method Summary
protected  void breakBasicBlock(int index)
          introduce a basic block boundary immediately after instruction number 'index' if it is not followed by pi instructions, or after the pi instructions otherwise
 void visitConditionalBranch(SSAConditionalBranchInstruction instruction)
           
 void visitGoto(SSAGotoInstruction instruction)
           
 void visitPhi(SSAPhiInstruction instruction)
           
 void visitReturn(SSAReturnInstruction instruction)
           
 void visitSwitch(SSASwitchInstruction instruction)
           
 void visitThrow(SSAThrowInstruction instruction)
           
 
Methods inherited from class com.ibm.wala.ssa.SSAInstruction.Visitor
visitArrayLength, visitArrayLoad, visitArrayStore, visitBinaryOp, visitCheckCast, visitComparison, visitConversion, visitGet, visitGetCaughtException, visitInstanceof, visitInvoke, visitLoadMetadata, visitMonitor, visitNew, visitPi, visitPut, visitUnaryOp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InducedCFG.BranchVisitor

protected InducedCFG.BranchVisitor(boolean[] r)
Method Detail

visitGoto

public void visitGoto(SSAGotoInstruction instruction)
Specified by:
visitGoto in interface SSAInstruction.IVisitor
Overrides:
visitGoto in class SSAInstruction.Visitor

visitConditionalBranch

public void visitConditionalBranch(SSAConditionalBranchInstruction instruction)
Specified by:
visitConditionalBranch in interface SSAInstruction.IVisitor
Overrides:
visitConditionalBranch in class SSAInstruction.Visitor

visitSwitch

public void visitSwitch(SSASwitchInstruction instruction)
Specified by:
visitSwitch in interface SSAInstruction.IVisitor
Overrides:
visitSwitch in class SSAInstruction.Visitor

visitPhi

public void visitPhi(SSAPhiInstruction instruction)
Specified by:
visitPhi in interface SSAInstruction.IVisitor
Overrides:
visitPhi in class SSAInstruction.Visitor

visitReturn

public void visitReturn(SSAReturnInstruction instruction)
Specified by:
visitReturn in interface SSAInstruction.IVisitor
Overrides:
visitReturn in class SSAInstruction.Visitor

visitThrow

public void visitThrow(SSAThrowInstruction instruction)
Specified by:
visitThrow in interface SSAInstruction.IVisitor
Overrides:
visitThrow in class SSAInstruction.Visitor

breakBasicBlock

protected void breakBasicBlock(int index)
introduce a basic block boundary immediately after instruction number 'index' if it is not followed by pi instructions, or after the pi instructions otherwise