comparison graal/GraalCompiler/src/com/sun/c1x/alloc/LinearScan.java @ 2674:6ab73784566a

* BlockBegin.predecessors changed to List<BlockEnd> * Node: add input/successor with given back edge index, allows for explicit ordering of predecessors/usages * Graphviz: PDF output, option to omit FrameStates * runscimark.sh: forward additional options to JVM
author Lukas Stadler <lukas.stadler@jku.at>
date Fri, 13 May 2011 15:18:41 +0200
parents 4dd0573f510b
children 618f545fcac5 7ed72769d51a
comparison
equal deleted inserted replaced
2673:98447ab8bd83 2674:6ab73784566a
1594 // because the number of predecessor edges matches the number of 1594 // because the number of predecessor edges matches the number of
1595 // successor edges, blocks which are reached by switch statements 1595 // successor edges, blocks which are reached by switch statements
1596 // may have be more than one predecessor but it will be guaranteed 1596 // may have be more than one predecessor but it will be guaranteed
1597 // that all predecessors will be the same. 1597 // that all predecessors will be the same.
1598 for (int i = 0; i < toBlock.numberOfPreds(); i++) { 1598 for (int i = 0; i < toBlock.numberOfPreds(); i++) {
1599 assert fromBlock == toBlock.predAt(i) : "all critical edges must be broken"; 1599 assert fromBlock == toBlock.predAt(i).begin() : "all critical edges must be broken";
1600 } 1600 }
1601 } 1601 }
1602 1602
1603 moveResolver.setInsertPosition(toBlock.lir(), 0); 1603 moveResolver.setInsertPosition(toBlock.lir(), 0);
1604 } 1604 }
1625 assert instructions.get(instructions.size() - 1).code == LIROpcode.Branch : "block with successors must end with branch"; 1625 assert instructions.get(instructions.size() - 1).code == LIROpcode.Branch : "block with successors must end with branch";
1626 assert ((LIRBranch) instructions.get(instructions.size() - 1)).cond() == Condition.TRUE : "block with successor must end with unconditional branch"; 1626 assert ((LIRBranch) instructions.get(instructions.size() - 1)).cond() == Condition.TRUE : "block with successor must end with unconditional branch";
1627 1627
1628 // check if block is empty (only label and branch) 1628 // check if block is empty (only label and branch)
1629 if (instructions.size() == 2) { 1629 if (instructions.size() == 2) {
1630 BlockBegin pred = block.predAt(0); 1630 BlockBegin pred = block.predAt(0).begin();
1631 BlockBegin sux = block.suxAt(0); 1631 BlockBegin sux = block.suxAt(0);
1632 1632
1633 // prevent optimization of two consecutive blocks 1633 // prevent optimization of two consecutive blocks
1634 if (!blockCompleted.get(pred.linearScanNumber()) && !blockCompleted.get(sux.linearScanNumber())) { 1634 if (!blockCompleted.get(pred.linearScanNumber()) && !blockCompleted.get(sux.linearScanNumber())) {
1635 if (C1XOptions.TraceLinearScanLevel >= 3) { 1635 if (C1XOptions.TraceLinearScanLevel >= 3) {