changeset 7891:b8f387456757

Merge.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Tue, 26 Feb 2013 17:25:14 +0100
parents caa932ca99b3 (diff) 7a5bbcc36bb2 (current diff)
children 7f3fc1210e8c
files
diffstat 5 files changed, 10 insertions(+), 93 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/Architecture.java	Tue Feb 26 16:35:23 2013 +0100
+++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/Architecture.java	Tue Feb 26 17:25:14 2013 +0100
@@ -23,9 +23,6 @@
 package com.oracle.graal.api.code;
 
 import java.nio.*;
-import java.util.*;
-
-import com.oracle.graal.api.code.Register.RegisterFlag;
 
 /**
  * Represents a CPU architecture, including information such as its endianness, CPU registers, word
@@ -79,22 +76,6 @@
      */
     private final int returnAddressSize;
 
-    private final EnumMap<RegisterFlag, Register[]> registersByTypeAndEncoding;
-
-    /**
-     * Gets the register for a given {@linkplain Register#encoding encoding} and type.
-     * 
-     * @param encoding a register value as used in a machine instruction
-     * @param type the type of the register
-     */
-    public Register registerFor(int encoding, RegisterFlag type) {
-        Register[] regs = registersByTypeAndEncoding.get(type);
-        assert encoding >= 0 && encoding < regs.length;
-        Register reg = regs[encoding];
-        assert reg != null;
-        return reg;
-    }
-
     protected Architecture(String name, int wordSize, ByteOrder byteOrder, Register[] registers, int implicitMemoryBarriers, int nativeCallDisplacementOffset, int registerReferenceMapBitCount,
                     int returnAddressSize) {
         this.name = name;
@@ -105,18 +86,6 @@
         this.machineCodeCallDisplacementOffset = nativeCallDisplacementOffset;
         this.registerReferenceMapBitCount = registerReferenceMapBitCount;
         this.returnAddressSize = returnAddressSize;
-
-        registersByTypeAndEncoding = new EnumMap<>(RegisterFlag.class);
-        EnumMap<RegisterFlag, Register[]> categorizedRegs = Register.categorize(registers);
-        for (RegisterFlag type : RegisterFlag.values()) {
-            Register[] regs = categorizedRegs.get(type);
-            int max = Register.maxRegisterEncoding(regs);
-            Register[] regsByEnc = new Register[max + 1];
-            for (Register reg : regs) {
-                regsByEnc[reg.encoding] = reg;
-            }
-            registersByTypeAndEncoding.put(type, regsByEnc);
-        }
     }
 
     /**
@@ -161,14 +130,6 @@
     }
 
     /**
-     * Gets a mask of the barrier constants denoting the barriers that are not required to be
-     * explicitly inserted under this architecture.
-     */
-    public int getImplicitMemoryBarriers() {
-        return implicitMemoryBarriers;
-    }
-
-    /**
      * Gets the size of the return address pushed to the stack by a call instruction. A value of 0
      * denotes that call linkage uses registers instead.
      */
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/LIRGenerator.java	Tue Feb 26 16:35:23 2013 +0100
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/LIRGenerator.java	Tue Feb 26 17:25:14 2013 +0100
@@ -90,6 +90,16 @@
      */
     private final ArrayList<StackSlot> lockDataSlots;
 
+    /**
+     * Checks whether the supplied constant can be used without loading it into a register for store
+     * operations, i.e., on the right hand side of a memory access.
+     * 
+     * @param c The constant to check.
+     * @return True if the constant can be used directly, false if the constant needs to be in a
+     *         register.
+     */
+    public abstract boolean canStoreConstant(Constant c);
+
     public LIRGenerator(StructuredGraph graph, CodeCacheProvider runtime, TargetDescription target, FrameMap frameMap, ResolvedJavaMethod method, LIR lir) {
         this.graph = graph;
         this.runtime = runtime;
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/FrameMap.java	Tue Feb 26 16:35:23 2013 +0100
+++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/FrameMap.java	Tue Feb 26 17:25:14 2013 +0100
@@ -347,28 +347,4 @@
             }
         }
     }
-
-    /**
-     * Clears the specified location as a reference in the reference map of the debug information.
-     * The tracked location can be a {@link RegisterValue} or a {@link StackSlot}. Note that a
-     * {@link Constant} is automatically tracked.
-     * 
-     * @param location The location to be removed from the reference map.
-     * @param registerRefMap A register reference map, as created by {@link #initRegisterRefMap()}.
-     * @param frameRefMap A frame reference map, as created by {@link #initFrameRefMap()}.
-     */
-    public void clearReference(Value location, BitSet registerRefMap, BitSet frameRefMap) {
-        if (location.getKind() == Kind.Object) {
-            if (location instanceof RegisterValue) {
-                registerRefMap.clear(asRegister(location).number);
-            } else if (isStackSlot(location)) {
-                int index = frameRefMapIndex(asStackSlot(location));
-                if (index < frameRefMap.size()) {
-                    frameRefMap.clear(index);
-                }
-            } else {
-                assert isConstant(location);
-            }
-        }
-    }
 }
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/StandardOp.java	Tue Feb 26 16:35:23 2013 +0100
+++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/StandardOp.java	Tue Feb 26 17:25:14 2013 +0100
@@ -33,8 +33,6 @@
  */
 public class StandardOp {
 
-    private static Value[] EMPTY = new Value[0];
-
     /**
      * Marker interface for LIR ops that can fall through to the next operation, like a switch
      * statement. setFallThroughTarget(null) can be used to make the operation fall through to the
@@ -99,24 +97,6 @@
         }
     }
 
-    public static class PhiJumpOp extends JumpOp {
-
-        @Alive({REG, STACK, CONST}) protected Value[] phiInputs;
-
-        public PhiJumpOp(LabelRef destination, Value[] phiInputs) {
-            super(destination, null);
-            this.phiInputs = phiInputs;
-        }
-
-        public void markResolved() {
-            phiInputs = EMPTY;
-        }
-
-        public Value[] getPhiInputs() {
-            return phiInputs;
-        }
-    }
-
     /**
      * Marker interface for a LIR operation that is a conditional jump to {@link #destination()}.
      * Conditional jumps may be negated or optimized away after register allocation.
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/LIRGeneratorTool.java	Tue Feb 26 16:35:23 2013 +0100
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/LIRGeneratorTool.java	Tue Feb 26 17:25:14 2013 +0100
@@ -45,16 +45,6 @@
      */
     public abstract boolean canInlineConstant(Constant c);
 
-    /**
-     * Checks whether the supplied constant can be used without loading it into a register for store
-     * operations, i.e., on the right hand side of a memory access.
-     * 
-     * @param c The constant to check.
-     * @return True if the constant can be used directly, false if the constant needs to be in a
-     *         register.
-     */
-    public abstract boolean canStoreConstant(Constant c);
-
     public abstract RegisterAttributes attributes(Register register);
 
     public abstract Value operand(ValueNode object);