private BasicBlock createBB(Stack<ExceptionRegion> nestedExceptionRegions) { return createBB(scope.getNewLabel(), nestedExceptionRegions); }
private BasicBlock createBB(Stack<ExceptionRegion> nestedExceptionRegions) { return createBB(scope.getNewLabel(), nestedExceptionRegions); }
private BasicBlock createBB(Stack<ExceptionRegion> nestedExceptionRegions) { return createBB(scope.getNewLabel(), nestedExceptionRegions); }
private BasicBlock createBB(Stack<ExceptionRegion> nestedExceptionRegions) { return createBB(scope.getNewLabel(), nestedExceptionRegions); }
/** * Create special empty exit BasicBlock that all BasicBlocks will eventually * flow into. All Edges to this 'dummy' BasicBlock will get marked with * an edge type of EXIT. * * Special BasicBlocks worth noting: * 1. Exceptions, Returns, Entry(why?) -> ExitBB * 2. Returns -> ExitBB */ private BasicBlock buildExitBasicBlock(Stack<ExceptionRegion> nestedExceptionRegions, BasicBlock firstBB, List<BasicBlock> returnBBs, List<BasicBlock> exceptionBBs, boolean nextIsFallThrough, BasicBlock currBB, BasicBlock entryBB) { exitBB = createBB(nestedExceptionRegions); graph.addEdge(entryBB, exitBB, EdgeType.EXIT); graph.addEdge(entryBB, firstBB, EdgeType.FALL_THROUGH); for (BasicBlock rb : returnBBs) { graph.addEdge(rb, exitBB, EdgeType.EXIT); } for (BasicBlock rb : exceptionBBs) { graph.addEdge(rb, exitBB, EdgeType.EXIT); } if (nextIsFallThrough) graph.addEdge(currBB, exitBB, EdgeType.EXIT); return exitBB; }
/** * Create special empty exit BasicBlock that all BasicBlocks will eventually * flow into. All Edges to this 'dummy' BasicBlock will get marked with * an edge type of EXIT. * * Special BasicBlocks worth noting: * 1. Exceptions, Returns, Entry(why?) -> ExitBB * 2. Returns -> ExitBB */ private BasicBlock buildExitBasicBlock(Stack<ExceptionRegion> nestedExceptionRegions, BasicBlock firstBB, List<BasicBlock> returnBBs, List<BasicBlock> exceptionBBs, boolean nextIsFallThrough, BasicBlock currBB, BasicBlock entryBB) { exitBB = createBB(nestedExceptionRegions); graph.addEdge(entryBB, exitBB, EdgeType.EXIT); graph.addEdge(entryBB, firstBB, EdgeType.FALL_THROUGH); for (BasicBlock rb : returnBBs) { graph.addEdge(rb, exitBB, EdgeType.EXIT); } for (BasicBlock rb : exceptionBBs) { graph.addEdge(rb, exitBB, EdgeType.EXIT); } if (nextIsFallThrough) graph.addEdge(currBB, exitBB, EdgeType.EXIT); return exitBB; }
/** * Create special empty exit BasicBlock that all BasicBlocks will eventually * flow into. All Edges to this 'dummy' BasicBlock will get marked with * an edge type of EXIT. * * Special BasicBlocks worth noting: * 1. Exceptions, Returns, Entry(why?) -> ExitBB * 2. Returns -> ExitBB */ private BasicBlock buildExitBasicBlock(Stack<ExceptionRegion> nestedExceptionRegions, BasicBlock firstBB, List<BasicBlock> returnBBs, List<BasicBlock> exceptionBBs, boolean nextIsFallThrough, BasicBlock currBB, BasicBlock entryBB) { exitBB = createBB(nestedExceptionRegions); graph.addEdge(entryBB, exitBB, EdgeType.EXIT); graph.addEdge(entryBB, firstBB, EdgeType.FALL_THROUGH); for (BasicBlock rb : returnBBs) { graph.addEdge(rb, exitBB, EdgeType.EXIT); } for (BasicBlock rb : exceptionBBs) { graph.addEdge(rb, exitBB, EdgeType.EXIT); } if (nextIsFallThrough) graph.addEdge(currBB, exitBB, EdgeType.EXIT); return exitBB; }
/** * Create special empty exit BasicBlock that all BasicBlocks will eventually * flow into. All Edges to this 'dummy' BasicBlock will get marked with * an edge type of EXIT. * * Special BasicBlocks worth noting: * 1. Exceptions, Returns, Entry(why?) -> ExitBB * 2. Returns -> ExitBB */ private BasicBlock buildExitBasicBlock(Stack<ExceptionRegion> nestedExceptionRegions, BasicBlock firstBB, List<BasicBlock> returnBBs, List<BasicBlock> exceptionBBs, boolean nextIsFallThrough, BasicBlock currBB, BasicBlock entryBB) { exitBB = createBB(nestedExceptionRegions); graph.addEdge(entryBB, exitBB, EdgeType.EXIT); graph.addEdge(entryBB, firstBB, EdgeType.FALL_THROUGH); for (BasicBlock rb : returnBBs) { graph.addEdge(rb, exitBB, EdgeType.EXIT); } for (BasicBlock rb : exceptionBBs) { graph.addEdge(rb, exitBB, EdgeType.EXIT); } if (nextIsFallThrough) graph.addEdge(currBB, exitBB, EdgeType.EXIT); return exitBB; }