< 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
@@ -24,11 +24,10 @@
import static jdk.vm.ci.code.ValueUtil.asRegister;
import static jdk.vm.ci.code.ValueUtil.asStackSlot;
import static jdk.vm.ci.code.ValueUtil.isRegister;
import static jdk.vm.ci.code.ValueUtil.isStackSlot;
-import static org.graalvm.compiler.core.common.GraalOptions.DetailedAsserts;
import static org.graalvm.compiler.lir.LIRValueUtil.asVariable;
import static org.graalvm.compiler.lir.LIRValueUtil.isVariable;
import static org.graalvm.compiler.lir.debug.LIRGenerationDebugContext.getSourceForOperandFromDebugContext;
import java.util.ArrayDeque;
@@ -39,10 +38,11 @@
import org.graalvm.compiler.core.common.LIRKind;
import org.graalvm.compiler.core.common.PermanentBailoutException;
import org.graalvm.compiler.core.common.alloc.ComputeBlockOrder;
import org.graalvm.compiler.core.common.cfg.AbstractBlockBase;
import org.graalvm.compiler.core.common.util.BitMap2D;
+import org.graalvm.compiler.debug.Assertions;
import org.graalvm.compiler.debug.DebugContext;
import org.graalvm.compiler.debug.GraalError;
import org.graalvm.compiler.debug.Indent;
import org.graalvm.compiler.lir.InstructionValueConsumer;
import org.graalvm.compiler.lir.LIRInstruction;
@@ -86,11 +86,11 @@
protected void run(TargetDescription target, LIRGenerationResult lirGenRes, AllocationContext context) {
numberInstructions();
debug.dump(DebugContext.VERBOSE_LEVEL, lirGenRes.getLIR(), "Before register allocation");
computeLocalLiveSets();
computeGlobalLiveSets();
- buildIntervals(DetailedAsserts.getValue(allocator.getOptions()));
+ buildIntervals(Assertions.detailedAssertionsEnabled(allocator.getOptions()));
}
/**
* Bit set for each variable that is contained in each loop.
*/
@@ -362,18 +362,18 @@
throw new PermanentBailoutException("too many iterations in computeGlobalLiveSets");
}
}
} while (changeOccurred);
- if (DetailedAsserts.getValue(allocator.getOptions())) {
+ if (Assertions.detailedAssertionsEnabled(allocator.getOptions())) {
verifyLiveness();
}
// check that the liveIn set of the first block is empty
AbstractBlockBase<?> startBlock = allocator.getLIR().getControlFlowGraph().getStartBlock();
if (allocator.getBlockData(startBlock).liveIn.cardinality() != 0) {
- if (DetailedAsserts.getValue(allocator.getOptions())) {
+ if (Assertions.detailedAssertionsEnabled(allocator.getOptions())) {
reportFailure(numBlocks);
}
// bailout if this occurs in product mode.
throw new GraalError("liveIn set of first block must be empty: " + allocator.getBlockData(startBlock).liveIn);
}
@@ -568,11 +568,11 @@
protected void handleMethodArguments(LIRInstruction op) {
if (ValueMoveOp.isValueMoveOp(op)) {
ValueMoveOp move = ValueMoveOp.asValueMoveOp(op);
if (optimizeMethodArgument(move.getInput())) {
StackSlot slot = asStackSlot(move.getInput());
- if (DetailedAsserts.getValue(allocator.getOptions())) {
+ if (Assertions.detailedAssertionsEnabled(allocator.getOptions())) {
assert op.id() > 0 : "invalid id";
assert allocator.blockForId(op.id()).getPredecessorCount() == 0 : "move from stack must be in first block";
assert isVariable(move.getResult()) : "result of move must be a variable";
if (debug.isLogEnabled()) {
< prev index next >