changeset 22733:072dc455f35e

Update jvmci import: Register and PlatformKind declarations for AVX512.
author Roland Schatz <roland.schatz@oracle.com>
date Wed, 30 Sep 2015 15:50:25 +0200
parents 677b1d02cb0d
children 0052aa6ed733
files graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotLIRGenerator.java graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotRegisterAllocationConfig.java graal/com.oracle.graal.lir/src/com/oracle/graal/lir/alloc/lsra/LinearScanLifetimeAnalysisPhase.java graal/com.oracle.graal.lir/src/com/oracle/graal/lir/dfa/LocationMarkerPhase.java mx.graal/suite.py
diffstat 5 files changed, 20 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotLIRGenerator.java	Wed Sep 30 13:49:06 2015 +0200
+++ b/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotLIRGenerator.java	Wed Sep 30 15:50:25 2015 +0200
@@ -30,7 +30,6 @@
 import static com.oracle.graal.hotspot.HotSpotBackend.UNCOMMON_TRAP;
 import static com.oracle.graal.lir.LIRValueUtil.asConstant;
 import static com.oracle.graal.lir.LIRValueUtil.isConstantValue;
-import static jdk.internal.jvmci.amd64.AMD64.cpuxmmRegisters;
 import static jdk.internal.jvmci.amd64.AMD64.rbp;
 
 import java.util.ArrayList;
@@ -358,7 +357,7 @@
     public SaveRegistersOp emitSaveAllRegisters() {
         // We are saving all registers.
         // TODO Save upper half of YMM registers.
-        return emitSaveAllRegisters(cpuxmmRegisters, false);
+        return emitSaveAllRegisters(target().arch.getAvailableValueRegisters(), false);
     }
 
     protected void emitRestoreRegisters(AMD64SaveRegistersOp save) {
--- a/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotRegisterAllocationConfig.java	Wed Sep 30 13:49:06 2015 +0200
+++ b/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotRegisterAllocationConfig.java	Wed Sep 30 15:50:25 2015 +0200
@@ -53,6 +53,7 @@
 import static jdk.internal.jvmci.amd64.AMD64.xmm8;
 import static jdk.internal.jvmci.amd64.AMD64.xmm9;
 
+import java.util.ArrayList;
 import java.util.BitSet;
 
 import jdk.internal.jvmci.code.Register;
@@ -90,16 +91,14 @@
             regMap.set(reg.number);
         }
 
-        Register[] allocatableRegisters = new Register[registers.length];
-        int i = 0;
+        ArrayList<Register> allocatableRegisters = new ArrayList<>(registers.length);
         for (Register reg : registerAllocationOrder) {
             if (regMap.get(reg.number)) {
-                allocatableRegisters[i++] = reg;
+                allocatableRegisters.add(reg);
             }
         }
 
-        assert i == allocatableRegisters.length;
-        return super.initAllocatable(allocatableRegisters);
+        return super.initAllocatable(allocatableRegisters.toArray(new Register[allocatableRegisters.size()]));
     }
 
     @Override
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/alloc/lsra/LinearScanLifetimeAnalysisPhase.java	Wed Sep 30 13:49:06 2015 +0200
+++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/alloc/lsra/LinearScanLifetimeAnalysisPhase.java	Wed Sep 30 15:50:25 2015 +0200
@@ -26,6 +26,7 @@
 import static com.oracle.graal.lir.LIRValueUtil.asVariable;
 import static com.oracle.graal.lir.LIRValueUtil.isVariable;
 import static com.oracle.graal.lir.debug.LIRGenerationDebugContext.getSourceForOperandFromDebugContext;
+import static jdk.internal.jvmci.code.ValueUtil.asRegister;
 import static jdk.internal.jvmci.code.ValueUtil.asStackSlot;
 import static jdk.internal.jvmci.code.ValueUtil.isRegister;
 import static jdk.internal.jvmci.code.ValueUtil.isStackSlot;
@@ -272,7 +273,7 @@
          */
         if (isRegister(operand) && block != allocator.getLIR().getControlFlowGraph().getStartBlock()) {
             if (allocator.isProcessed(operand)) {
-                assert liveKill.get(allocator.operandNumber(operand)) : "using fixed register that is not defined in this block";
+                assert liveKill.get(allocator.operandNumber(operand)) : "using fixed register " + asRegister(operand) + " that is not defined in this block " + block;
             }
         }
     }
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/dfa/LocationMarkerPhase.java	Wed Sep 30 13:49:06 2015 +0200
+++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/dfa/LocationMarkerPhase.java	Wed Sep 30 15:50:25 2015 +0200
@@ -73,7 +73,18 @@
 
         @Override
         protected boolean shouldProcessValue(Value operand) {
-            return (isRegister(operand) && attributes(asRegister(operand)).isAllocatable() || isStackSlot(operand)) && !operand.getLIRKind().equals(LIRKind.Illegal);
+            if (isRegister(operand)) {
+                Register reg = asRegister(operand);
+                if (reg.getReferenceMapIndex() < 0 || !attributes(reg).isAllocatable()) {
+                    // register that's not allocatable or not part of the reference map
+                    return false;
+                }
+            } else if (!isStackSlot(operand)) {
+                // neither register nor stack slot
+                return false;
+            }
+
+            return !operand.getLIRKind().equals(LIRKind.Illegal);
         }
 
         /**
--- a/mx.graal/suite.py	Wed Sep 30 13:49:06 2015 +0200
+++ b/mx.graal/suite.py	Wed Sep 30 15:50:25 2015 +0200
@@ -6,7 +6,7 @@
     "suites": [
             {
                "name" : "jvmci",
-               "version" : "1ec4129907b324ac03bab8bd86b800fbe0fb24b0",
+               "version" : "461dc858dc618019f68606349082146de7bf216c",
                "urls" : [
                     {"url" : "http://lafo.ssw.uni-linz.ac.at/hg/graal-jvmci-8", "kind" : "hg"},
                     {"url" : "https://curio.ssw.jku.at/nexus/content/repositories/snapshots", "kind" : "binary"},