Mercurial > hg > truffle
diff graal/GraalCompiler/src/com/sun/c1x/graph/IR.java @ 2581:4a36a0bd6d18
added GraalGraph to classpath, Node as superclass of Value
author | Lukas Stadler <lukas.stadler@jku.at> |
---|---|
date | Thu, 05 May 2011 13:27:48 +0200 |
parents | 274360f98f97 |
children | 768d77a1c7af |
line wrap: on
line diff
--- a/graal/GraalCompiler/src/com/sun/c1x/graph/IR.java Wed May 04 18:57:26 2011 +0200 +++ b/graal/GraalCompiler/src/com/sun/c1x/graph/IR.java Thu May 05 13:27:48 2011 +0200 @@ -166,7 +166,7 @@ */ public BlockBegin splitEdge(BlockBegin source, BlockBegin target) { int bci; - if (target.predecessors().size() == 1) { + if (target.blockPredecessors().size() == 1) { bci = target.bci(); } else { bci = source.end().bci(); @@ -199,7 +199,7 @@ // the successor could be the target of a switch so it might have // multiple copies of this predecessor, so substitute the new_sux // for the first and delete the rest. - List<BlockBegin> list = target.predecessors(); + List<BlockBegin> list = target.blockPredecessors(); int x = list.indexOf(source); assert x >= 0; list.set(x, newSucc); @@ -216,18 +216,18 @@ public void replaceBlock(BlockBegin oldBlock, BlockBegin newBlock) { assert !oldBlock.isExceptionEntry() : "cannot replace exception handler blocks (yet)"; - for (BlockBegin succ : oldBlock.end().successors()) { + for (BlockBegin succ : oldBlock.end().blockSuccessors()) { succ.removePredecessor(oldBlock); } - for (BlockBegin pred : oldBlock.predecessors()) { + for (BlockBegin pred : oldBlock.blockPredecessors()) { // substitute the new successor for this block in each predecessor pred.end().substituteSuccessor(oldBlock, newBlock); // and add each predecessor to the successor newBlock.addPredecessor(pred); } // this block is now disconnected; remove all its incoming and outgoing edges - oldBlock.predecessors().clear(); - oldBlock.end().successors().clear(); + oldBlock.blockPredecessors().clear(); + oldBlock.end().blockSuccessors().clear(); } /** @@ -235,11 +235,11 @@ * @param block the block to remove from the graph */ public void disconnectFromGraph(BlockBegin block) { - for (BlockBegin p : block.predecessors()) { - p.end().successors().remove(block); + for (BlockBegin p : block.blockPredecessors()) { + p.end().blockSuccessors().remove(block); } - for (BlockBegin s : block.end().successors()) { - s.predecessors().remove(block); + for (BlockBegin s : block.end().blockSuccessors()) { + s.blockPredecessors().remove(block); } }