org.jruby.compiler.ir.representations
Class CFG

java.lang.Object
  extended by org.jruby.compiler.ir.representations.CFG

public class CFG
extends java.lang.Object


Nested Class Summary
static class CFG.CFG_Edge
           
static class CFG.CFG_Edge_Type
           
 
Constructor Summary
CFG(IRExecutionScope s)
           
 
Method Summary
 void build(java.util.List<Instr> instrs)
           
 void buildDominatorTree()
           
 java.util.Set<Variable> definedLocalVarsFromClosures()
           
 boolean definesLocalVariable(Variable v)
           
 void deleteOrphanedBlocks()
           
 DataFlowProblem getDataFlowSolution(java.lang.String name)
           
 BasicBlock getEntryBB()
           
 BasicBlock getExitBB()
           
 org.jgrapht.DirectedGraph getGraph()
           
 Instr[] getInstrArray()
           
 int getMaxNodeID()
           
 int getNextBBID()
           
 java.util.Set<BasicBlock> getNodes()
           
 java.util.ListIterator<BasicBlock> getPostOrderTraverser()
           
 int getRescuerPC(Instr excInstr)
           
 java.util.ListIterator<BasicBlock> getReversePostOrderTraverser()
           
 IRExecutionScope getScope()
           
 BasicBlock getTargetBB(Label l)
           
 java.util.Set<CFG.CFG_Edge> incomingEdgesOf(BasicBlock bb)
           
 void inlineMethod(IRMethod m, BasicBlock callBB, CallInstr call)
           
 java.util.List<BasicBlock> linearize()
           
 int numNodes()
           
 void optimizeCFG()
           
 java.util.Set<CFG.CFG_Edge> outgoingEdgesOf(BasicBlock bb)
           
 Instr[] prepareForInterpretation()
           
 void setDataFlowSolution(java.lang.String name, DataFlowProblem p)
           
 void setUpUseDefLocalVarMaps()
           
 void splitCalls()
           
 java.lang.String toString()
           
 java.lang.String toStringInstrs()
           
 java.util.Set<Variable> usedLocalVarsFromClosures()
           
 boolean usesLocalVariable(Variable v)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CFG

public CFG(IRExecutionScope s)
Method Detail

getGraph

public org.jgrapht.DirectedGraph getGraph()

getScope

public IRExecutionScope getScope()

getEntryBB

public BasicBlock getEntryBB()

getExitBB

public BasicBlock getExitBB()

getNextBBID

public int getNextBBID()

getMaxNodeID

public int getMaxNodeID()

numNodes

public int numNodes()

incomingEdgesOf

public java.util.Set<CFG.CFG_Edge> incomingEdgesOf(BasicBlock bb)

outgoingEdgesOf

public java.util.Set<CFG.CFG_Edge> outgoingEdgesOf(BasicBlock bb)

getNodes

public java.util.Set<BasicBlock> getNodes()

getTargetBB

public BasicBlock getTargetBB(Label l)

getRescuerPC

public int getRescuerPC(Instr excInstr)

prepareForInterpretation

public Instr[] prepareForInterpretation()

getInstrArray

public Instr[] getInstrArray()

build

public void build(java.util.List<Instr> instrs)

inlineMethod

public void inlineMethod(IRMethod m,
                         BasicBlock callBB,
                         CallInstr call)

getPostOrderTraverser

public java.util.ListIterator<BasicBlock> getPostOrderTraverser()

getReversePostOrderTraverser

public java.util.ListIterator<BasicBlock> getReversePostOrderTraverser()

buildDominatorTree

public void buildDominatorTree()

toStringInstrs

public java.lang.String toStringInstrs()

setDataFlowSolution

public void setDataFlowSolution(java.lang.String name,
                                DataFlowProblem p)

getDataFlowSolution

public DataFlowProblem getDataFlowSolution(java.lang.String name)

deleteOrphanedBlocks

public void deleteOrphanedBlocks()

splitCalls

public void splitCalls()

optimizeCFG

public void optimizeCFG()

linearize

public java.util.List<BasicBlock> linearize()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

setUpUseDefLocalVarMaps

public void setUpUseDefLocalVarMaps()

usedLocalVarsFromClosures

public java.util.Set<Variable> usedLocalVarsFromClosures()

definedLocalVarsFromClosures

public java.util.Set<Variable> definedLocalVarsFromClosures()

usesLocalVariable

public boolean usesLocalVariable(Variable v)

definesLocalVariable

public boolean definesLocalVariable(Variable v)


Copyright © 2002-2009 JRuby Team. All Rights Reserved.