comparison graal/GraalCompiler/src/com/sun/c1x/gen/LIRGenerator.java @ 2812:d27bdbec3d67

Removed ArrayLength from CFG. Fixed an issue when scheduling Merge instructions within a block. If a block only consists of a single Merge instruction, we have to schedule this instruction as the first instruction.
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Mon, 30 May 2011 15:24:26 +0200
parents 50b5db2c3e68
children 015be60afcf3 ac4b086cbd72
comparison
equal deleted inserted replaced
2810:6fb5a1bf819f 2812:d27bdbec3d67
220 220
221 if (C1XOptions.TraceLIRGeneratorLevel >= 1) { 221 if (C1XOptions.TraceLIRGeneratorLevel >= 1) {
222 TTY.println("BEGIN Generating LIR for block B" + block.blockID()); 222 TTY.println("BEGIN Generating LIR for block B" + block.blockID());
223 } 223 }
224 224
225 if (block.blockPredecessors().size() > 1) {
226 lastState = null;
227 }
228
225 for (Node instr : block.getInstructions()) { 229 for (Node instr : block.getInstructions()) {
226 FrameState stateAfter = null; 230 FrameState stateAfter = null;
227 if (instr instanceof Instruction) { 231 if (instr instanceof Instruction) {
228 stateAfter = ((Instruction) instr).stateAfter(); 232 stateAfter = ((Instruction) instr).stateAfter();
229 } 233 }
684 return item.result(); 688 return item.result();
685 } 689 }
686 } 690 }
687 } 691 }
688 692
689 protected CiValue emitXir(XirSnippet snippet, Instruction x, LIRDebugInfo info, RiMethod method, boolean setInstructionResult) { 693 protected CiValue emitXir(XirSnippet snippet, Value x, LIRDebugInfo info, RiMethod method, boolean setInstructionResult) {
690 return emitXir(snippet, x, info, null, method, setInstructionResult, null); 694 return emitXir(snippet, x, info, null, method, setInstructionResult, null);
691 } 695 }
692 696
693 protected CiValue emitXir(XirSnippet snippet, Instruction instruction, LIRDebugInfo info, LIRDebugInfo infoAfter, RiMethod method, boolean setInstructionResult, List<CiValue> pointerSlots) { 697 protected CiValue emitXir(XirSnippet snippet, Value instruction, LIRDebugInfo info, LIRDebugInfo infoAfter, RiMethod method, boolean setInstructionResult, List<CiValue> pointerSlots) {
694 if (C1XOptions.PrintXirTemplates) { 698 if (C1XOptions.PrintXirTemplates) {
695 TTY.println("Emit XIR template " + snippet.template.name); 699 TTY.println("Emit XIR template " + snippet.template.name);
696 } 700 }
697 701
698 final CiValue[] operands = new CiValue[snippet.template.variableCount]; 702 final CiValue[] operands = new CiValue[snippet.template.variableCount];