< prev index next >

src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.lir/src/org/graalvm/compiler/lir/alloc/lsra/LinearScanLifetimeAnalysisPhase.java

Print this page

        

*** 174,184 **** ArrayList<LIRInstruction> instructions = allocator.getLIR().getLIRforBlock(block); int numInst = instructions.size(); ValueConsumer useConsumer = (operand, mode, flags) -> { if (isVariable(operand)) { ! int operandNum = allocator.operandNumber(operand); if (!liveKillScratch.get(operandNum)) { liveGenScratch.set(operandNum); if (debug.isLogEnabled()) { debug.log("liveGen for operand %d(%s)", operandNum, operand); } --- 174,184 ---- ArrayList<LIRInstruction> instructions = allocator.getLIR().getLIRforBlock(block); int numInst = instructions.size(); ValueConsumer useConsumer = (operand, mode, flags) -> { if (isVariable(operand)) { ! int operandNum = getOperandNumber(operand); if (!liveKillScratch.get(operandNum)) { liveGenScratch.set(operandNum); if (debug.isLogEnabled()) { debug.log("liveGen for operand %d(%s)", operandNum, operand); }
*** 192,213 **** verifyInput(block, liveKillScratch, operand); } }; ValueConsumer stateConsumer = (operand, mode, flags) -> { if (LinearScan.isVariableOrRegister(operand)) { ! int operandNum = allocator.operandNumber(operand); if (!liveKillScratch.get(operandNum)) { liveGenScratch.set(operandNum); if (debug.isLogEnabled()) { debug.log("liveGen in state for operand %d(%s)", operandNum, operand); } } } }; ValueConsumer defConsumer = (operand, mode, flags) -> { if (isVariable(operand)) { ! int varNum = allocator.operandNumber(operand); liveKillScratch.set(varNum); if (debug.isLogEnabled()) { debug.log("liveKill for operand %d(%s)", varNum, operand); } if (block.getLoop() != null) { --- 192,213 ---- verifyInput(block, liveKillScratch, operand); } }; ValueConsumer stateConsumer = (operand, mode, flags) -> { if (LinearScan.isVariableOrRegister(operand)) { ! int operandNum = getOperandNumber(operand); if (!liveKillScratch.get(operandNum)) { liveGenScratch.set(operandNum); if (debug.isLogEnabled()) { debug.log("liveGen in state for operand %d(%s)", operandNum, operand); } } } }; ValueConsumer defConsumer = (operand, mode, flags) -> { if (isVariable(operand)) { ! int varNum = getOperandNumber(operand); liveKillScratch.set(varNum); if (debug.isLogEnabled()) { debug.log("liveKill for operand %d(%s)", varNum, operand); } if (block.getLoop() != null) {
*** 266,276 **** * Fixed intervals are never live at block boundaries, so they need not be processed in live * sets. Process them only in debug mode so that this can be checked */ if (isRegister(operand)) { if (allocator.isProcessed(operand)) { ! liveKill.set(allocator.operandNumber(operand)); } } } private void verifyInput(AbstractBlockBase<?> block, BitSet liveKill, Value operand) { --- 266,276 ---- * Fixed intervals are never live at block boundaries, so they need not be processed in live * sets. Process them only in debug mode so that this can be checked */ if (isRegister(operand)) { if (allocator.isProcessed(operand)) { ! liveKill.set(getOperandNumber(operand)); } } } private void verifyInput(AbstractBlockBase<?> block, BitSet liveKill, Value operand) {
*** 279,293 **** * sets. This is checked by these assertions to be sure about it. The entry block may have * incoming values in registers, which is ok. */ if (isRegister(operand) && block != allocator.getLIR().getControlFlowGraph().getStartBlock()) { if (allocator.isProcessed(operand)) { ! assert liveKill.get(allocator.operandNumber(operand)) : "using fixed register " + asRegister(operand) + " that is not defined in this block " + block; } } } /** * Performs a backward dataflow analysis to compute global live sets (i.e. * {@link BlockData#liveIn} and {@link BlockData#liveOut}) for each block. */ @SuppressWarnings("try") --- 279,297 ---- * sets. This is checked by these assertions to be sure about it. The entry block may have * incoming values in registers, which is ok. */ if (isRegister(operand) && block != allocator.getLIR().getControlFlowGraph().getStartBlock()) { if (allocator.isProcessed(operand)) { ! assert liveKill.get(getOperandNumber(operand)) : "using fixed register " + asRegister(operand) + " that is not defined in this block " + block; } } } + protected int getOperandNumber(Value operand) { + return allocator.operandNumber(operand); + } + /** * Performs a backward dataflow analysis to compute global live sets (i.e. * {@link BlockData#liveIn} and {@link BlockData#liveOut}) for each block. */ @SuppressWarnings("try")
< prev index next >