Package org.jruby.ir.representations
Class CFG
java.lang.Object
org.jruby.ir.representations.CFG
Represents the base build of a CFG. All information here is accessed via
delegation from the CFG itself so this is meant as an internal
organizational structure for a build.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidaddEdge(BasicBlock source, BasicBlock destination, CFG.EdgeType type) voidbooleanorg.jruby.dirgra.DirectedGraph<BasicBlock, CFG.EdgeType> Build the Control Flow GraphClone this CFG and return a new one.voidvoidfixupEdges(BasicBlock bb) getBBForLabel(Label label) Iterable<org.jruby.dirgra.Edge<BasicBlock, CFG.EdgeType>> getIncomingEdges(BasicBlock block) getIncomingSourceOfType(BasicBlock block, CFG.EdgeType type) getIncomingSources(BasicBlock block) intintgetOutgoingDestinationOfType(BasicBlock block, CFG.EdgeType type) getOutgoingDestinationsNotOfType(BasicBlock block, CFG.EdgeType type) getOutgoingDestinationsOfType(BasicBlock block, CFG.EdgeType type) Collection<org.jruby.dirgra.Edge<BasicBlock, CFG.EdgeType>> getOutgoingEdges(BasicBlock block) getRescuerBBFor(BasicBlock block) getScope()intvoidoptimize()intvoidvoidvoidremoveEdge(BasicBlock a, BasicBlock b) voidsetRescuerBB(BasicBlock block, BasicBlock rescuerBlock) intsize()How many BasicBlocks are there in this CFG?
-
Constructor Details
-
CFG
-
-
Method Details
-
getNextBBID
public int getNextBBID() -
getManager
-
getMaxNodeID
public int getMaxNodeID() -
bbIsProtected
-
getBBForLabel
-
getEntryBB
-
getExitBB
-
getGlobalEnsureBB
-
postOrderList
-
getPostOrderTraverser
-
getReversePostOrderTraverser
-
getScope
-
size
public int size()How many BasicBlocks are there in this CFG? -
getBasicBlocks
-
getSortedBasicBlocks
-
addEdge
-
inDegree
-
outDegree
-
getIncomingSources
-
getIncomingEdges
-
getIncomingSourceOfType
-
getOutgoingDestinationOfType
-
getOutgoingDestinations
-
getOutgoingDestinationsOfType
-
getOutgoingDestinationsNotOfType
-
getOutgoingEdges
public Collection<org.jruby.dirgra.Edge<BasicBlock,CFG.EdgeType>> getOutgoingEdges(BasicBlock block) -
getRescuerBBFor
-
addGlobalEnsureBB
-
setRescuerBB
-
build
Build the Control Flow Graph -
fixupEdges
-
addBasicBlock
-
removeAllOutgoingEdgesForBB
-
removeBB
-
collapseStraightLineBBs
public void collapseStraightLineBBs() -
optimize
public void optimize() -
toStringGraph
-
toStringInstrs
-
removeEdge
-
clone
Clone this CFG and return a new one.- Parameters:
info- context object to perform the cloneclonedScope- already cloned IRScope which this new CFG will belong to- Returns:
- a newly cloned CFG
-