changeset 18436:59e65d3aa2fc

Use StackSlotValue where appropriate.
author Josef Eisl <josef.eisl@jku.at>
date Tue, 11 Nov 2014 14:15:39 +0100
parents a84639853ea6
children 7ce389a85277
files graal/com.oracle.graal.compiler.amd64/src/com/oracle/graal/compiler/amd64/AMD64LIRGenerator.java graal/com.oracle.graal.compiler.hsail/src/com/oracle/graal/compiler/hsail/HSAILLIRGenerator.java graal/com.oracle.graal.compiler.ptx/src/com/oracle/graal/compiler/ptx/PTXLIRGenerator.java graal/com.oracle.graal.compiler.sparc/src/com/oracle/graal/compiler/sparc/SPARCLIRGenerator.java graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/backend/AllocatorTest.java graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/Interval.java graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScan.java graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScanWalker.java graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/OptimizingLinearScanWalker.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotLockStack.java graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64Move.java graal/com.oracle.graal.lir.hsail/src/com/oracle/graal/lir/hsail/HSAILAddressValue.java graal/com.oracle.graal.lir.ptx/src/com/oracle/graal/lir/ptx/PTXAddressValue.java
diffstat 13 files changed, 20 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler.amd64/src/com/oracle/graal/compiler/amd64/AMD64LIRGenerator.java	Tue Nov 11 14:12:55 2014 +0100
+++ b/graal/com.oracle.graal.compiler.amd64/src/com/oracle/graal/compiler/amd64/AMD64LIRGenerator.java	Tue Nov 11 14:15:39 2014 +0100
@@ -108,7 +108,7 @@
     protected AMD64LIRInstruction createMove(AllocatableValue dst, Value src) {
         if (src instanceof AMD64AddressValue) {
             return new LeaOp(dst, (AMD64AddressValue) src);
-        } else if (isRegister(src) || isStackSlot(dst)) {
+        } else if (isRegister(src) || isStackSlotValue(dst)) {
             return new MoveFromRegOp(dst.getKind(), dst, src);
         } else {
             return new MoveToRegOp(dst.getKind(), dst, src);
--- a/graal/com.oracle.graal.compiler.hsail/src/com/oracle/graal/compiler/hsail/HSAILLIRGenerator.java	Tue Nov 11 14:12:55 2014 +0100
+++ b/graal/com.oracle.graal.compiler.hsail/src/com/oracle/graal/compiler/hsail/HSAILLIRGenerator.java	Tue Nov 11 14:15:39 2014 +0100
@@ -86,7 +86,7 @@
     protected HSAILLIRInstruction createMove(AllocatableValue dst, Value src) {
         if (src instanceof HSAILAddressValue) {
             return new LeaOp(dst, (HSAILAddressValue) src);
-        } else if (isRegister(src) || isStackSlot(dst)) {
+        } else if (isRegister(src) || isStackSlotValue(dst)) {
             return new MoveFromRegOp(dst.getKind(), dst, src);
         } else {
             return new MoveToRegOp(dst.getKind(), dst, src);
--- a/graal/com.oracle.graal.compiler.ptx/src/com/oracle/graal/compiler/ptx/PTXLIRGenerator.java	Tue Nov 11 14:12:55 2014 +0100
+++ b/graal/com.oracle.graal.compiler.ptx/src/com/oracle/graal/compiler/ptx/PTXLIRGenerator.java	Tue Nov 11 14:15:39 2014 +0100
@@ -127,7 +127,7 @@
 
     @Override
     public void emitMove(AllocatableValue dst, Value src) {
-        if (isRegister(src) || isStackSlot(dst)) {
+        if (isRegister(src) || isStackSlotValue(dst)) {
             append(new MoveFromRegOp(dst, src));
         } else {
             append(new MoveToRegOp(dst, src));
--- a/graal/com.oracle.graal.compiler.sparc/src/com/oracle/graal/compiler/sparc/SPARCLIRGenerator.java	Tue Nov 11 14:12:55 2014 +0100
+++ b/graal/com.oracle.graal.compiler.sparc/src/com/oracle/graal/compiler/sparc/SPARCLIRGenerator.java	Tue Nov 11 14:15:39 2014 +0100
@@ -100,7 +100,7 @@
     protected SPARCLIRInstruction createMove(AllocatableValue dst, Value src) {
         if (src instanceof SPARCAddressValue) {
             return new LoadAddressOp(dst, (SPARCAddressValue) src);
-        } else if (isRegister(src) || isStackSlot(dst)) {
+        } else if (isRegister(src) || isStackSlotValue(dst)) {
             return new MoveFromRegOp(dst, src);
         } else {
             return new MoveToRegOp(dst, src);
--- a/graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/backend/AllocatorTest.java	Tue Nov 11 14:12:55 2014 +0100
+++ b/graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/backend/AllocatorTest.java	Tue Nov 11 14:15:39 2014 +0100
@@ -98,7 +98,7 @@
                     if (ValueUtil.isRegister(use)) {
                         regRegMoves++;
                     }
-                } else if (ValueUtil.isStackSlot(def)) {
+                } else if (ValueUtil.isStackSlotValue(def)) {
                     spillMoves++;
                 }
             }
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/Interval.java	Tue Nov 11 14:12:55 2014 +0100
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/Interval.java	Tue Nov 11 14:15:39 2014 +0100
@@ -547,7 +547,7 @@
             assert canMaterialize();
         } else {
             assert this.location == null || isRegister(this.location) : "cannot re-assign location for " + this;
-            assert isStackSlot(newLocation);
+            assert isStackSlotValue(newLocation);
             assert !newLocation.getLIRKind().equals(LIRKind.Illegal);
             assert newLocation.getLIRKind().equals(this.kind);
         }
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScan.java	Tue Nov 11 14:12:55 2014 +0100
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScan.java	Tue Nov 11 14:15:39 2014 +0100
@@ -565,7 +565,7 @@
                                 AllocatableValue toLocation = canonicalSpillOpr(interval);
 
                                 assert isRegister(fromLocation) : "from operand must be a register but is: " + fromLocation + " toLocation=" + toLocation + " spillState=" + interval.spillState();
-                                assert isStackSlot(toLocation) : "to operand must be a stack slot";
+                                assert isStackSlotValue(toLocation) : "to operand must be a stack slot";
 
                                 insertionBuffer.append(j + 1, ir.getSpillMoveFactory().createMove(toLocation, fromLocation));
 
@@ -1728,7 +1728,7 @@
         // the intervals
         // if the interval is not live, colorLirOperand will cause an assert on failure
         Value result = colorLirOperand((Variable) operand, tempOpId, mode);
-        assert !hasCall(tempOpId) || isStackSlot(result) || isConstant(result) || !isCallerSave(result) : "cannot have caller-save register operands at calls";
+        assert !hasCall(tempOpId) || isStackSlotValue(result) || isConstant(result) || !isCallerSave(result) : "cannot have caller-save register operands at calls";
         return result;
     }
 
@@ -1898,7 +1898,7 @@
                 Interval firstSpillChild = null;
                 try (Indent indent = Debug.logAndIndent("interval %s (%s)", interval, defBlock)) {
                     for (Interval splitChild : interval.getSplitChildren()) {
-                        if (isStackSlot(splitChild.location())) {
+                        if (isStackSlotValue(splitChild.location())) {
                             if (firstSpillChild == null || splitChild.from() < firstSpillChild.from()) {
                                 firstSpillChild = splitChild;
                             } else {
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScanWalker.java	Tue Nov 11 14:12:55 2014 +0100
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/LinearScanWalker.java	Tue Nov 11 14:15:39 2014 +0100
@@ -535,7 +535,7 @@
      * This is called for every interval that is assigned to a stack slot.
      */
     protected void handleSpillSlot(Interval interval) {
-        assert interval.location() != null && (interval.canMaterialize() || isStackSlot(interval.location())) : "interval not assigned to a stack slot " + interval;
+        assert interval.location() != null && (interval.canMaterialize() || isStackSlotValue(interval.location())) : "interval not assigned to a stack slot " + interval;
         // Do nothing. Stack slots are not processed in this implementation.
     }
 
@@ -853,7 +853,7 @@
         try (Indent indent = Debug.logAndIndent("activating interval %s,  splitParent: %d", interval, interval.splitParent().operandNumber)) {
 
             final Value operand = interval.operand;
-            if (interval.location() != null && isStackSlot(interval.location())) {
+            if (interval.location() != null && isStackSlotValue(interval.location())) {
                 // activating an interval that has a stack slot assigned . split it at first use
                 // position
                 // used for method parameters
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/OptimizingLinearScanWalker.java	Tue Nov 11 14:12:55 2014 +0100
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/alloc/OptimizingLinearScanWalker.java	Tue Nov 11 14:15:39 2014 +0100
@@ -53,10 +53,10 @@
     protected void handleSpillSlot(Interval interval) {
         assert interval.location() != null : "interval  not assigned " + interval;
         if (interval.canMaterialize()) {
-            assert !isStackSlot(interval.location()) : "interval can materialize but assigned to a stack slot " + interval;
+            assert !isStackSlotValue(interval.location()) : "interval can materialize but assigned to a stack slot " + interval;
             return;
         }
-        assert isStackSlot(interval.location()) : "interval not assigned to a stack slot " + interval;
+        assert isStackSlotValue(interval.location()) : "interval not assigned to a stack slot " + interval;
         try (Scope s1 = Debug.scope("LSRAOptimization")) {
             Debug.log("adding stack to unhandled list %s", interval);
             unhandledLists.addToListSortedByStartAndUsePositions(RegisterBinding.Stack, interval);
@@ -152,13 +152,13 @@
             return false;
         }
 
-        if (!isStackSlot(predecessorLocation) && !isRegister(predecessorLocation)) {
+        if (!isStackSlotValue(predecessorLocation) && !isRegister(predecessorLocation)) {
             assert predecessorInterval.canMaterialize();
             // value is materialized -> no need for optimization
             return false;
         }
 
-        assert isStackSlot(currentLocation) || isRegister(currentLocation) : "current location not a register or stack slot " + currentLocation;
+        assert isStackSlotValue(currentLocation) || isRegister(currentLocation) : "current location not a register or stack slot " + currentLocation;
 
         try (Indent indent = Debug.logAndIndent("location differs: %s vs. %s", predecessorLocation, currentLocation)) {
             // split current interval at current position
@@ -187,7 +187,7 @@
                 if (isRegister(predecessorLocation)) {
                     splitRegisterInterval(splitPart, asRegister(predecessorLocation));
                 } else {
-                    assert isStackSlot(predecessorLocation);
+                    assert isStackSlotValue(predecessorLocation);
                     Debug.log("assigning interval %s to %s", splitPart, predecessorLocation);
                     splitPart.assignLocation(predecessorLocation);
                     // activate interval
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotLockStack.java	Tue Nov 11 14:12:55 2014 +0100
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotLockStack.java	Tue Nov 11 14:15:39 2014 +0100
@@ -48,7 +48,7 @@
      */
     public StackSlotValue makeLockSlot(int lockDepth) {
         if (locks == null) {
-            locks = new StackSlot[lockDepth + 1];
+            locks = new StackSlotValue[lockDepth + 1];
         } else if (locks.length < lockDepth + 1) {
             locks = Arrays.copyOf(locks, lockDepth + 1);
         }
--- a/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64Move.java	Tue Nov 11 14:12:55 2014 +0100
+++ b/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64Move.java	Tue Nov 11 14:15:39 2014 +0100
@@ -342,7 +342,7 @@
         @Use({STACK, UNINITIALIZED}) protected StackSlotValue slot;
 
         public StackLeaOp(AllocatableValue result, StackSlotValue slot) {
-            assert isVirtualStackSlot(slot) || isStackSlot(slot) : "Not a stack slot: " + slot;
+            assert isStackSlotValue(slot) : "Not a stack slot: " + slot;
             this.result = result;
             this.slot = slot;
         }
--- a/graal/com.oracle.graal.lir.hsail/src/com/oracle/graal/lir/hsail/HSAILAddressValue.java	Tue Nov 11 14:12:55 2014 +0100
+++ b/graal/com.oracle.graal.lir.hsail/src/com/oracle/graal/lir/hsail/HSAILAddressValue.java	Tue Nov 11 14:15:39 2014 +0100
@@ -62,7 +62,7 @@
         super(kind);
         this.base = base;
         this.displacement = displacement;
-        assert !isStackSlot(base);
+        assert !isStackSlotValue(base);
     }
 
     public HSAILAddress toAddress() {
--- a/graal/com.oracle.graal.lir.ptx/src/com/oracle/graal/lir/ptx/PTXAddressValue.java	Tue Nov 11 14:12:55 2014 +0100
+++ b/graal/com.oracle.graal.lir.ptx/src/com/oracle/graal/lir/ptx/PTXAddressValue.java	Tue Nov 11 14:15:39 2014 +0100
@@ -64,7 +64,7 @@
         this.base = base;
         this.displacement = displacement;
 
-        assert !isStackSlot(base);
+        assert !isStackSlotValue(base);
     }
 
     public PTXAddress toAddress() {