< prev index next >

src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/cfg/ControlFlowGraph.java

Print this page

        

*** 590,600 **** if (graph.hasLoops()) { Block[] stack = new Block[this.reversePostOrder.length]; for (Block block : reversePostOrder) { AbstractBeginNode beginNode = block.getBeginNode(); if (beginNode instanceof LoopBeginNode) { ! Loop<Block> loop = new HIRLoop(block.getLoop(), loops.size(), block); loops.add(loop); block.setLoop(loop); loop.getBlocks().add(block); LoopBeginNode loopBegin = (LoopBeginNode) beginNode; --- 590,604 ---- if (graph.hasLoops()) { Block[] stack = new Block[this.reversePostOrder.length]; for (Block block : reversePostOrder) { AbstractBeginNode beginNode = block.getBeginNode(); if (beginNode instanceof LoopBeginNode) { ! Loop<Block> parent = block.getLoop(); ! Loop<Block> loop = new HIRLoop(parent, loops.size(), block); ! if (parent != null) { ! parent.getChildren().add(loop); ! } loops.add(loop); block.setLoop(loop); loop.getBlocks().add(block); LoopBeginNode loopBegin = (LoopBeginNode) beginNode;
< prev index next >