/** * Get the exit node. */ public BasicBlock getExit() { if (exit == null) { exit = allocate(); } return exit; }
/** * Allocate a new basic block in the subroutine. */ public BasicBlock allocateBasicBlock() { return cfgSub.allocate(); }
/** * Get the entry node. */ public BasicBlock getEntry() { if (entry == null) { entry = allocate(); } return entry; }
/** * Get the block in the result CFG corresponding to the given subroutine * block. * * @param subBlock * the subroutine block * @return the result CFG block */ public BasicBlock getBlock(BasicBlock subBlock) { BasicBlock resultBlock = blockMap.get(subBlock); if (resultBlock == null) { resultBlock = result.allocate(); blockMap.put(subBlock, resultBlock); workList.add(subBlock); } return resultBlock; }
/** * Get the exit node. */ public BasicBlock getExit() { if (exit == null) { exit = allocate(); } return exit; }
/** * Get the entry node. */ public BasicBlock getEntry() { if (entry == null) { entry = allocate(); } return entry; }
/** * Allocate a new basic block in the subroutine. */ public BasicBlock allocateBasicBlock() { return cfgSub.allocate(); }
/** * Get the block in the result CFG corresponding to the given subroutine * block. * * @param subBlock * the subroutine block * @return the result CFG block */ public BasicBlock getBlock(BasicBlock subBlock) { BasicBlock resultBlock = blockMap.get(subBlock); if (resultBlock == null) { resultBlock = result.allocate(); blockMap.put(subBlock, resultBlock); workList.add(subBlock); } return resultBlock; }