Class CFGUtil.RegionFinder
java.lang.Object
com.pnfsoftware.jeb.core.units.code.CFGUtil.RegionFinder
- Enclosing class:
- CFGUtil
This class attempts to determine a region in a graph. A region consists of a set of blocks,
reachable from an entry block, and reaching an optional set of outputs. The only way to reach
a region's node is via the entry block.
-
Constructor Summary
ConstructorsConstructorDescriptionRegionFinder
(CFG<? extends IInstruction> cfg, long entry, long output) Build a finder for a region having a single output, for which the region blocks cannot loop back to the entry.RegionFinder
(CFG<? extends IInstruction> cfg, long entry, Set<Long> outputs, boolean canLoopBackToEntry) Build a region finder. -
Method Summary
-
Constructor Details
-
RegionFinder
public RegionFinder(CFG<? extends IInstruction> cfg, long entry, Set<Long> outputs, boolean canLoopBackToEntry) Build a region finder.- Parameters:
cfg
- CFGentry
- entry block addressoutputs
- output block addresses (may be 0, 1, or 2+)canLoopBackToEntry
- true if the blocks in the region to-be-determined may loop back to the entry node; false if they may not
-
RegionFinder
Build a finder for a region having a single output, for which the region blocks cannot loop back to the entry.- Parameters:
cfg
- CFGentry
- entry block addressoutput
- exit block address
-
-
Method Details
-
getRegionBlocks
- Returns:
- the list of blocks in the region (the list of outputs can never be included in this result)
-
process
public boolean process()- Returns:
- true if a region was properly determined; else, false
-