comparison graal/GraalCompiler/src/com/sun/c1x/alloc/RegisterVerifier.java @ 2833:1cd59ca9ac86

Removed Throw HIR instruction. Removed special handling for exceptions in register allocator.
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Tue, 31 May 2011 13:30:23 +0200
parents a2f62de90c76
children
comparison
equal deleted inserted replaced
2832:775c31be565c 2833:1cd59ca9ac86
99 99
100 processBlock(block); 100 processBlock(block);
101 } while (!workList.isEmpty()); 101 } while (!workList.isEmpty());
102 } 102 }
103 103
104 void processBlock(LIRBlock block) { 104 private void processBlock(LIRBlock block) {
105 if (C1XOptions.TraceLinearScanLevel >= 2) { 105 if (C1XOptions.TraceLinearScanLevel >= 2) {
106 TTY.println(); 106 TTY.println();
107 TTY.println("processBlock B%d", block.blockID()); 107 TTY.println("processBlock B%d", block.blockID());
108 } 108 }
109 109
131 for (LIRBlock succ : block.blockSuccessors()) { 131 for (LIRBlock succ : block.blockSuccessors()) {
132 processSuccessor(succ, inputState); 132 processSuccessor(succ, inputState);
133 } 133 }
134 } 134 }
135 135
136 void processXhandler(LIRBlock xhandler, Interval[] inputState) { 136 private void processSuccessor(LIRBlock block, Interval[] inputState) {
137 if (C1XOptions.TraceLinearScanLevel >= 2) {
138 TTY.println("processXhandler B%d", xhandler.blockID());
139 }
140
141 // must copy state because it is modified
142 inputState = copy(inputState);
143
144 if (xhandler.lir() != null) {
145 processOperations(xhandler.lir(), inputState);
146 }
147 processSuccessor(xhandler, inputState);
148 }
149
150 void processSuccessor(LIRBlock block, Interval[] inputState) {
151 Interval[] savedState = stateForBlock(block); 137 Interval[] savedState = stateForBlock(block);
152 138
153 if (savedState != null) { 139 if (savedState != null) {
154 // this block was already processed before. 140 // this block was already processed before.
155 // check if new inputState is consistent with savedState 141 // check if new inputState is consistent with savedState
256 for (CiRegister r : allocator.compilation.registerConfig.getCallerSaveRegisters()) { 242 for (CiRegister r : allocator.compilation.registerConfig.getCallerSaveRegisters()) {
257 statePut(inputState, r.asValue(), null); 243 statePut(inputState, r.asValue(), null);
258 } 244 }
259 } 245 }
260 246
261 // process xhandler before output and temp operands
262 if (op.exceptionEdge() != null) {
263 processXhandler(op.exceptionEdge(), inputState);
264 }
265
266 // set temp operands (some operations use temp operands also as output operands, so can't set them null) 247 // set temp operands (some operations use temp operands also as output operands, so can't set them null)
267 n = op.operandCount(LIRInstruction.OperandMode.Temp); 248 n = op.operandCount(LIRInstruction.OperandMode.Temp);
268 for (int j = 0; j < n; j++) { 249 for (int j = 0; j < n; j++) {
269 CiValue operand = op.operandAt(LIRInstruction.OperandMode.Temp, j); 250 CiValue operand = op.operandAt(LIRInstruction.OperandMode.Temp, j);
270 if (allocator.isProcessed(operand)) { 251 if (allocator.isProcessed(operand)) {