public LoopsData(final StructuredGraph graph) { cfg = Debug.scope( "ControlFlowGraph", new Callable<ControlFlowGraph>() { @Override public ControlFlowGraph call() throws Exception { return ControlFlowGraph.compute(graph, true, true, true, true); } }); for (Loop lirLoop : cfg.getLoops()) { LoopEx ex = new LoopEx(lirLoop, this); lirLoopToEx.put(lirLoop, ex); loopBeginToEx.put(ex.loopBegin(), ex); } }
public Collection<LoopEx> loops() { return lirLoopToEx.values(); }
public LoopEx loop(LoopBeginNode loopBegin) { return loopBeginToEx.get(loopBegin); }
public LoopEx loop(Loop lirLoop) { return lirLoopToEx.get(lirLoop); }