Mercurial > hg > truffle
changeset 7888:938b8209b10b
Merge.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Tue, 26 Feb 2013 14:31:33 +0100 |
parents | d99bce9bbbb2 (diff) d1cffd1990d5 (current diff) |
children | 8bf25fab6e83 |
files | graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/LIRGeneratorTool.java |
diffstat | 4 files changed, 10 insertions(+), 70 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/Architecture.java Tue Feb 26 12:19:20 2013 +0100 +++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/Architecture.java Tue Feb 26 14:31:33 2013 +0100 @@ -79,22 +79,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 +89,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 +133,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 12:19:20 2013 +0100 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/LIRGenerator.java Tue Feb 26 14:31:33 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 12:19:20 2013 +0100 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/FrameMap.java Tue Feb 26 14:31:33 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.nodes/src/com/oracle/graal/nodes/spi/LIRGeneratorTool.java Tue Feb 26 12:19:20 2013 +0100 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/spi/LIRGeneratorTool.java Tue Feb 26 14:31:33 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);