changeset 23306:0a2e40f7a5d2

Remove usages of CodeCacheProvider.needsDataPatch.
author Roland Schatz <roland.schatz@oracle.com>
date Thu, 14 Jan 2016 12:57:32 +0100
parents ff34c70df30c
children c2e662ca2423
files graal/com.oracle.graal.compiler.aarch64/src/com/oracle/graal/compiler/aarch64/AArch64AddressLowering.java graal/com.oracle.graal.compiler.aarch64/src/com/oracle/graal/compiler/aarch64/AArch64MoveFactory.java graal/com.oracle.graal.compiler.amd64/src/com/oracle/graal/compiler/amd64/AMD64AddressLowering.java graal/com.oracle.graal.compiler.amd64/src/com/oracle/graal/compiler/amd64/AMD64LIRGenerator.java graal/com.oracle.graal.compiler.amd64/src/com/oracle/graal/compiler/amd64/AMD64MoveFactory.java graal/com.oracle.graal.compiler.sparc/src/com/oracle/graal/compiler/sparc/SPARCAddressLowering.java graal/com.oracle.graal.compiler.sparc/src/com/oracle/graal/compiler/sparc/SPARCMoveFactory.java graal/com.oracle.graal.hotspot.aarch64/src/com/oracle/graal/hotspot/aarch64/AArch64HotSpotBackendFactory.java graal/com.oracle.graal.hotspot.aarch64/src/com/oracle/graal/hotspot/aarch64/AArch64HotSpotLIRGenerator.java graal/com.oracle.graal.hotspot.aarch64/src/com/oracle/graal/hotspot/aarch64/AArch64HotSpotMoveFactory.java graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotAddressLowering.java graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotBackendFactory.java 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/AMD64HotSpotMoveFactory.java graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotBackendFactory.java graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotLIRGenerator.java graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotMoveFactory.java graal/com.oracle.graal.lir.aarch64/src/com/oracle/graal/lir/aarch64/AArch64ControlFlow.java graal/com.oracle.graal.lir.aarch64/src/com/oracle/graal/lir/aarch64/AArch64Move.java graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64ControlFlow.java graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64Move.java graal/com.oracle.graal.lir/src/com/oracle/graal/lir/asm/CompilationResultBuilder.java
diffstat 22 files changed, 69 insertions(+), 149 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler.aarch64/src/com/oracle/graal/compiler/aarch64/AArch64AddressLowering.java	Thu Jan 14 01:16:19 2016 +0100
+++ b/graal/com.oracle.graal.compiler.aarch64/src/com/oracle/graal/compiler/aarch64/AArch64AddressLowering.java	Thu Jan 14 12:57:32 2016 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,18 +27,11 @@
 import com.oracle.graal.nodes.memory.address.AddressNode;
 import com.oracle.graal.phases.common.AddressLoweringPhase.AddressLowering;
 
-import jdk.vm.ci.code.CodeCacheProvider;
 import jdk.vm.ci.common.JVMCIError;
 import jdk.vm.ci.meta.JavaConstant;
 
 public class AArch64AddressLowering extends AddressLowering {
 
-    private final CodeCacheProvider codeCache;
-
-    public AArch64AddressLowering(CodeCacheProvider codeCache) {
-        this.codeCache = codeCache;
-    }
-
     @Override
     public AddressNode lower(ValueNode address) {
         return lower(address, null);
@@ -50,9 +43,9 @@
         throw JVMCIError.unimplemented();
     }
 
-    private JavaConstant asImmediate(ValueNode value) {
+    private static JavaConstant asImmediate(ValueNode value) {
         JavaConstant c = value.asJavaConstant();
-        if (c != null && c.getJavaKind().isNumericInteger() && !codeCache.needsDataPatch(c)) {
+        if (c != null && c.getJavaKind().isNumericInteger()) {
             return c;
         } else {
             return null;
--- a/graal/com.oracle.graal.compiler.aarch64/src/com/oracle/graal/compiler/aarch64/AArch64MoveFactory.java	Thu Jan 14 01:16:19 2016 +0100
+++ b/graal/com.oracle.graal.compiler.aarch64/src/com/oracle/graal/compiler/aarch64/AArch64MoveFactory.java	Thu Jan 14 12:57:32 2016 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -33,7 +33,6 @@
 import com.oracle.graal.lir.aarch64.AArch64Move.LoadAddressOp;
 import com.oracle.graal.lir.gen.LIRGeneratorTool.MoveFactory;
 
-import jdk.vm.ci.code.CodeCacheProvider;
 import jdk.vm.ci.common.JVMCIError;
 import jdk.vm.ci.meta.AllocatableValue;
 import jdk.vm.ci.meta.Constant;
@@ -42,11 +41,9 @@
 
 public class AArch64MoveFactory implements MoveFactory {
 
-    private final CodeCacheProvider codeCache;
     protected final ConstantTableBaseProvider constantTableBaseProvider;
 
-    public AArch64MoveFactory(CodeCacheProvider codeCache, ConstantTableBaseProvider constantTableBaseProvider) {
-        this.codeCache = codeCache;
+    public AArch64MoveFactory(ConstantTableBaseProvider constantTableBaseProvider) {
         this.constantTableBaseProvider = constantTableBaseProvider;
     }
 
@@ -101,12 +98,10 @@
             case Short:
             case Int:
                 // return SPARCAssembler.isSimm13(c.asInt()) && !codeCache.needsDataPatch(c);
-                boolean x = !codeCache.needsDataPatch(c);
-                throw JVMCIError.unimplemented("needsDataPatch=" + x);
+                throw JVMCIError.unimplemented();
             case Long:
                 // return SPARCAssembler.isSimm13(c.asLong()) && !codeCache.needsDataPatch(c);
-                boolean y = !codeCache.needsDataPatch(c);
-                throw JVMCIError.unimplemented("needsDataPatch=" + y);
+                throw JVMCIError.unimplemented();
             case Object:
                 return c.isNull();
             default:
--- a/graal/com.oracle.graal.compiler.amd64/src/com/oracle/graal/compiler/amd64/AMD64AddressLowering.java	Thu Jan 14 01:16:19 2016 +0100
+++ b/graal/com.oracle.graal.compiler.amd64/src/com/oracle/graal/compiler/amd64/AMD64AddressLowering.java	Thu Jan 14 12:57:32 2016 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,6 @@
 
 package com.oracle.graal.compiler.amd64;
 
-import jdk.vm.ci.code.CodeCacheProvider;
 import jdk.vm.ci.meta.JavaConstant;
 
 import com.oracle.graal.asm.NumUtil;
@@ -38,12 +37,6 @@
 
 public class AMD64AddressLowering extends AddressLowering {
 
-    private final CodeCacheProvider codeCache;
-
-    public AMD64AddressLowering(CodeCacheProvider codeCache) {
-        this.codeCache = codeCache;
-    }
-
     @Override
     public AddressNode lower(ValueNode address) {
         return lower(address, null);
@@ -111,7 +104,7 @@
         return false;
     }
 
-    private ValueNode improveInput(AMD64AddressNode address, ValueNode node, int shift) {
+    private static ValueNode improveInput(AMD64AddressNode address, ValueNode node, int shift) {
         if (node == null) {
             return null;
         }
@@ -143,8 +136,8 @@
         return node;
     }
 
-    private ValueNode improveConstDisp(AMD64AddressNode address, ValueNode original, JavaConstant c, ValueNode other, int shift) {
-        if (c.getJavaKind().isNumericInteger() && !codeCache.needsDataPatch(c)) {
+    private static ValueNode improveConstDisp(AMD64AddressNode address, ValueNode original, JavaConstant c, ValueNode other, int shift) {
+        if (c.getJavaKind().isNumericInteger()) {
             long disp = address.getDisplacement();
             disp += c.asLong() << shift;
             if (NumUtil.isInt(disp)) {
--- a/graal/com.oracle.graal.compiler.amd64/src/com/oracle/graal/compiler/amd64/AMD64LIRGenerator.java	Thu Jan 14 01:16:19 2016 +0100
+++ b/graal/com.oracle.graal.compiler.amd64/src/com/oracle/graal/compiler/amd64/AMD64LIRGenerator.java	Thu Jan 14 12:57:32 2016 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -102,11 +102,11 @@
      * @return True if the constant can be used directly, false if the constant needs to be in a
      *         register.
      */
-    protected final boolean canStoreConstant(JavaConstant c) {
+    protected static final boolean canStoreConstant(JavaConstant c) {
         // there is no immediate move of 64-bit constants on Intel
         switch (c.getJavaKind()) {
             case Long:
-                return Util.isInt(c.asLong()) && !getCodeCache().needsDataPatch(c);
+                return Util.isInt(c.asLong());
             case Double:
                 return false;
             case Object:
--- a/graal/com.oracle.graal.compiler.amd64/src/com/oracle/graal/compiler/amd64/AMD64MoveFactory.java	Thu Jan 14 01:16:19 2016 +0100
+++ b/graal/com.oracle.graal.compiler.amd64/src/com/oracle/graal/compiler/amd64/AMD64MoveFactory.java	Thu Jan 14 12:57:32 2016 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -42,22 +42,18 @@
 import com.oracle.graal.lir.amd64.AMD64Move.MoveFromConstOp;
 import com.oracle.graal.lir.amd64.AMD64Move.MoveFromRegOp;
 import com.oracle.graal.lir.amd64.AMD64Move.MoveToRegOp;
-import com.oracle.graal.lir.framemap.FrameMapBuilder;
 
 public abstract class AMD64MoveFactory extends AMD64MoveFactoryBase {
 
-    private final FrameMapBuilder frameMapBuilder;
-
-    public AMD64MoveFactory(BackupSlotProvider backupSlotProvider, FrameMapBuilder frameMapBuilder) {
+    public AMD64MoveFactory(BackupSlotProvider backupSlotProvider) {
         super(backupSlotProvider);
-        this.frameMapBuilder = frameMapBuilder;
     }
 
     @Override
     public boolean canInlineConstant(JavaConstant c) {
         switch (c.getJavaKind()) {
             case Long:
-                return NumUtil.isInt(c.asLong()) && !frameMapBuilder.getCodeCache().needsDataPatch(c);
+                return NumUtil.isInt(c.asLong());
             case Object:
                 return c.isNull();
             default:
--- a/graal/com.oracle.graal.compiler.sparc/src/com/oracle/graal/compiler/sparc/SPARCAddressLowering.java	Thu Jan 14 01:16:19 2016 +0100
+++ b/graal/com.oracle.graal.compiler.sparc/src/com/oracle/graal/compiler/sparc/SPARCAddressLowering.java	Thu Jan 14 12:57:32 2016 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,6 @@
 
 package com.oracle.graal.compiler.sparc;
 
-import jdk.vm.ci.code.CodeCacheProvider;
 import jdk.vm.ci.meta.JavaConstant;
 
 import com.oracle.graal.asm.sparc.SPARCAssembler;
@@ -34,12 +33,6 @@
 
 public class SPARCAddressLowering extends AddressLowering {
 
-    private final CodeCacheProvider codeCache;
-
-    public SPARCAddressLowering(CodeCacheProvider codeCache) {
-        this.codeCache = codeCache;
-    }
-
     @Override
     public AddressNode lower(ValueNode address) {
         return lower(address, 0);
@@ -82,9 +75,9 @@
         return base.graph().unique(new SPARCImmediateAddressNode(base, (int) displacement));
     }
 
-    private JavaConstant asImmediate(ValueNode value) {
+    private static JavaConstant asImmediate(ValueNode value) {
         JavaConstant c = value.asJavaConstant();
-        if (c != null && c.getJavaKind().isNumericInteger() && !codeCache.needsDataPatch(c)) {
+        if (c != null && c.getJavaKind().isNumericInteger()) {
             return c;
         } else {
             return null;
--- a/graal/com.oracle.graal.compiler.sparc/src/com/oracle/graal/compiler/sparc/SPARCMoveFactory.java	Thu Jan 14 01:16:19 2016 +0100
+++ b/graal/com.oracle.graal.compiler.sparc/src/com/oracle/graal/compiler/sparc/SPARCMoveFactory.java	Thu Jan 14 12:57:32 2016 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,6 @@
 import static com.oracle.graal.lir.LIRValueUtil.asConstant;
 import static com.oracle.graal.lir.LIRValueUtil.isConstantValue;
 import static com.oracle.graal.lir.LIRValueUtil.isStackSlotValue;
-import jdk.vm.ci.code.CodeCacheProvider;
 import jdk.vm.ci.common.JVMCIError;
 import jdk.vm.ci.meta.AllocatableValue;
 import jdk.vm.ci.meta.Constant;
@@ -44,11 +43,9 @@
 
 public class SPARCMoveFactory implements MoveFactory {
 
-    private final CodeCacheProvider codeCache;
     protected final ConstantTableBaseProvider constantTableBaseProvider;
 
-    public SPARCMoveFactory(CodeCacheProvider codeCache, ConstantTableBaseProvider constantTableBaseProvider) {
-        this.codeCache = codeCache;
+    public SPARCMoveFactory(ConstantTableBaseProvider constantTableBaseProvider) {
         this.constantTableBaseProvider = constantTableBaseProvider;
     }
 
@@ -97,9 +94,9 @@
             case Char:
             case Short:
             case Int:
-                return SPARCAssembler.isSimm13(c.asInt()) && !codeCache.needsDataPatch(c);
+                return SPARCAssembler.isSimm13(c.asInt());
             case Long:
-                return SPARCAssembler.isSimm13(c.asLong()) && !codeCache.needsDataPatch(c);
+                return SPARCAssembler.isSimm13(c.asLong());
             case Object:
                 return c.isNull();
             default:
--- a/graal/com.oracle.graal.hotspot.aarch64/src/com/oracle/graal/hotspot/aarch64/AArch64HotSpotBackendFactory.java	Thu Jan 14 01:16:19 2016 +0100
+++ b/graal/com.oracle.graal.hotspot.aarch64/src/com/oracle/graal/hotspot/aarch64/AArch64HotSpotBackendFactory.java	Thu Jan 14 12:57:32 2016 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,6 @@
 import static jdk.vm.ci.aarch64.AArch64.sp;
 import static jdk.vm.ci.inittimer.InitTimer.timer;
 import jdk.vm.ci.aarch64.AArch64;
-import jdk.vm.ci.code.CodeCacheProvider;
 import jdk.vm.ci.code.Register;
 import jdk.vm.ci.code.RegisterConfig;
 import jdk.vm.ci.code.TargetDescription;
@@ -125,7 +124,7 @@
                 replacements.setGraphBuilderPlugins(plugins);
             }
             try (InitTimer rt = timer("create Suites provider")) {
-                suites = createSuites(config, graalRuntime, compilerConfiguration, plugins, codeCache);
+                suites = createSuites(config, graalRuntime, compilerConfiguration, plugins);
             }
             providers = new HotSpotProviders(metaAccess, codeCache, constantReflection, foreignCalls, lowerer, replacements, suites, registers, snippetReflection, wordTypes, plugins);
         }
@@ -159,8 +158,8 @@
         return new AArch64HotSpotForeignCallsProvider(jvmciRuntime, runtime, metaAccess, codeCache, nativeABICallerSaveRegisters);
     }
 
-    protected HotSpotSuitesProvider createSuites(HotSpotVMConfig config, HotSpotGraalRuntimeProvider runtime, CompilerConfiguration compilerConfiguration, Plugins plugins, CodeCacheProvider codeCache) {
-        return new HotSpotSuitesProvider(new AArch64SuitesProvider(compilerConfiguration, plugins), config, runtime, new AArch64AddressLowering(codeCache));
+    protected HotSpotSuitesProvider createSuites(HotSpotVMConfig config, HotSpotGraalRuntimeProvider runtime, CompilerConfiguration compilerConfiguration, Plugins plugins) {
+        return new HotSpotSuitesProvider(new AArch64SuitesProvider(compilerConfiguration, plugins), config, runtime, new AArch64AddressLowering());
     }
 
     protected HotSpotSnippetReflectionProvider createSnippetReflection(HotSpotGraalRuntimeProvider runtime, HotSpotConstantReflectionProvider constantReflection, WordTypes wordTypes) {
--- a/graal/com.oracle.graal.hotspot.aarch64/src/com/oracle/graal/hotspot/aarch64/AArch64HotSpotLIRGenerator.java	Thu Jan 14 01:16:19 2016 +0100
+++ b/graal/com.oracle.graal.hotspot.aarch64/src/com/oracle/graal/hotspot/aarch64/AArch64HotSpotLIRGenerator.java	Thu Jan 14 12:57:32 2016 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -68,8 +68,8 @@
     }
 
     private AArch64HotSpotLIRGenerator(HotSpotProviders providers, HotSpotVMConfig config, CallingConvention cc, LIRGenerationResult lirGenRes, ConstantTableBaseProvider constantTableBaseProvider) {
-        this(new AArch64HotSpotLIRKindTool(), new AArch64ArithmeticLIRGenerator(), new AArch64HotSpotMoveFactory(providers.getCodeCache(), constantTableBaseProvider), providers, config, cc,
-                        lirGenRes, constantTableBaseProvider);
+        this(new AArch64HotSpotLIRKindTool(), new AArch64ArithmeticLIRGenerator(), new AArch64HotSpotMoveFactory(constantTableBaseProvider), providers, config, cc, lirGenRes,
+                        constantTableBaseProvider);
     }
 
     protected AArch64HotSpotLIRGenerator(LIRKindTool lirKindTool, AArch64ArithmeticLIRGenerator arithmeticLIRGen, MoveFactory moveFactory, HotSpotProviders providers, HotSpotVMConfig config,
--- a/graal/com.oracle.graal.hotspot.aarch64/src/com/oracle/graal/hotspot/aarch64/AArch64HotSpotMoveFactory.java	Thu Jan 14 01:16:19 2016 +0100
+++ b/graal/com.oracle.graal.hotspot.aarch64/src/com/oracle/graal/hotspot/aarch64/AArch64HotSpotMoveFactory.java	Thu Jan 14 12:57:32 2016 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,7 +30,6 @@
 import com.oracle.graal.compiler.aarch64.AArch64MoveFactory;
 import com.oracle.graal.lir.LIRInstruction;
 
-import jdk.vm.ci.code.CodeCacheProvider;
 import jdk.vm.ci.common.JVMCIError;
 import jdk.vm.ci.hotspot.HotSpotCompressedNullConstant;
 import jdk.vm.ci.hotspot.HotSpotConstant;
@@ -41,8 +40,8 @@
 
 public class AArch64HotSpotMoveFactory extends AArch64MoveFactory {
 
-    public AArch64HotSpotMoveFactory(CodeCacheProvider codeCache, ConstantTableBaseProvider constantTableBaseProvider) {
-        super(codeCache, constantTableBaseProvider);
+    public AArch64HotSpotMoveFactory(ConstantTableBaseProvider constantTableBaseProvider) {
+        super(constantTableBaseProvider);
     }
 
     @Override
--- a/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotAddressLowering.java	Thu Jan 14 01:16:19 2016 +0100
+++ b/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotAddressLowering.java	Thu Jan 14 12:57:32 2016 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,6 @@
 
 package com.oracle.graal.hotspot.amd64;
 
-import jdk.vm.ci.code.CodeCacheProvider;
 import jdk.vm.ci.code.Register;
 import jdk.vm.ci.hotspot.HotSpotVMConfig.CompressEncoding;
 import jdk.vm.ci.meta.LIRKind;
@@ -65,8 +64,7 @@
         }
     }
 
-    public AMD64HotSpotAddressLowering(CodeCacheProvider codeCache, long heapBase, Register heapBaseRegister) {
-        super(codeCache);
+    public AMD64HotSpotAddressLowering(long heapBase, Register heapBaseRegister) {
         this.heapBase = heapBase;
         if (heapBase == 0) {
             this.heapBaseRegister = null;
--- a/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotBackendFactory.java	Thu Jan 14 01:16:19 2016 +0100
+++ b/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotBackendFactory.java	Thu Jan 14 12:57:32 2016 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -29,7 +29,6 @@
 import java.util.List;
 
 import jdk.vm.ci.amd64.AMD64;
-import jdk.vm.ci.code.CodeCacheProvider;
 import jdk.vm.ci.code.Register;
 import jdk.vm.ci.code.RegisterConfig;
 import jdk.vm.ci.code.TargetDescription;
@@ -127,7 +126,7 @@
                 replacements.setGraphBuilderPlugins(plugins);
             }
             try (InitTimer rt = timer("create Suites provider")) {
-                suites = createSuites(config, graalRuntime, compilerConfiguration, plugins, codeCache, registers);
+                suites = createSuites(config, graalRuntime, compilerConfiguration, plugins, registers);
             }
             providers = new HotSpotProviders(metaAccess, codeCache, constantReflection, foreignCalls, lowerer, replacements, suites, registers, snippetReflection, wordTypes, plugins);
         }
@@ -162,8 +161,8 @@
     }
 
     protected HotSpotSuitesProvider createSuites(HotSpotVMConfig config, HotSpotGraalRuntimeProvider runtime, CompilerConfiguration compilerConfiguration, Plugins plugins,
-                    CodeCacheProvider codeCache, HotSpotRegistersProvider registers) {
-        return new HotSpotSuitesProvider(new AMD64SuitesProvider(compilerConfiguration, plugins), config, runtime, new AMD64HotSpotAddressLowering(codeCache, config.getOopEncoding().base,
+                    HotSpotRegistersProvider registers) {
+        return new HotSpotSuitesProvider(new AMD64SuitesProvider(compilerConfiguration, plugins), config, runtime, new AMD64HotSpotAddressLowering(config.getOopEncoding().base,
                         registers.getHeapBaseRegister()));
     }
 
--- a/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotLIRGenerator.java	Thu Jan 14 01:16:19 2016 +0100
+++ b/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotLIRGenerator.java	Thu Jan 14 12:57:32 2016 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -100,7 +100,7 @@
     }
 
     private AMD64HotSpotLIRGenerator(HotSpotProviders providers, HotSpotVMConfig config, CallingConvention cc, LIRGenerationResult lirGenRes, BackupSlotProvider backupSlotProvider) {
-        this(new AMD64HotSpotLIRKindTool(), new AMD64ArithmeticLIRGenerator(), new AMD64HotSpotMoveFactory(backupSlotProvider, lirGenRes.getFrameMapBuilder()), providers, config, cc, lirGenRes);
+        this(new AMD64HotSpotLIRKindTool(), new AMD64ArithmeticLIRGenerator(), new AMD64HotSpotMoveFactory(backupSlotProvider), providers, config, cc, lirGenRes);
     }
 
     protected AMD64HotSpotLIRGenerator(LIRKindTool lirKindTool, AMD64ArithmeticLIRGenerator arithmeticLIRGen, MoveFactory moveFactory, HotSpotProviders providers, HotSpotVMConfig config,
--- a/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotMoveFactory.java	Thu Jan 14 01:16:19 2016 +0100
+++ b/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotMoveFactory.java	Thu Jan 14 12:57:32 2016 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -32,12 +32,11 @@
 
 import com.oracle.graal.compiler.amd64.AMD64MoveFactory;
 import com.oracle.graal.lir.amd64.AMD64LIRInstruction;
-import com.oracle.graal.lir.framemap.FrameMapBuilder;
 
 public class AMD64HotSpotMoveFactory extends AMD64MoveFactory {
 
-    public AMD64HotSpotMoveFactory(BackupSlotProvider backupSlotProvider, FrameMapBuilder frameMapBuilder) {
-        super(backupSlotProvider, frameMapBuilder);
+    public AMD64HotSpotMoveFactory(BackupSlotProvider backupSlotProvider) {
+        super(backupSlotProvider);
     }
 
     @Override
--- a/graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotBackendFactory.java	Thu Jan 14 01:16:19 2016 +0100
+++ b/graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotBackendFactory.java	Thu Jan 14 12:57:32 2016 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,6 @@
 import java.util.HashSet;
 import java.util.Set;
 
-import jdk.vm.ci.code.CodeCacheProvider;
 import jdk.vm.ci.code.Register;
 import jdk.vm.ci.code.RegisterConfig;
 import jdk.vm.ci.code.TargetDescription;
@@ -93,7 +92,7 @@
         HotSpotReplacementsImpl replacements = new HotSpotReplacementsImpl(p, snippetReflection, config, target);
         Plugins plugins = createGraphBuilderPlugins(config, metaAccess, constantReflection, foreignCalls, stampProvider, snippetReflection, replacements, wordTypes);
         replacements.setGraphBuilderPlugins(plugins);
-        HotSpotSuitesProvider suites = createSuites(config, runtime, compilerConfiguration, plugins, codeCache);
+        HotSpotSuitesProvider suites = createSuites(config, runtime, compilerConfiguration, plugins);
         HotSpotProviders providers = new HotSpotProviders(metaAccess, codeCache, constantReflection, foreignCalls, lowerer, replacements, suites, registers, snippetReflection, wordTypes, plugins);
 
         return createBackend(config, runtime, providers);
@@ -107,8 +106,8 @@
         return plugins;
     }
 
-    protected HotSpotSuitesProvider createSuites(HotSpotVMConfig config, HotSpotGraalRuntimeProvider runtime, CompilerConfiguration compilerConfiguration, Plugins plugins, CodeCacheProvider codeCache) {
-        return new HotSpotSuitesProvider(new SPARCSuitesProvider(compilerConfiguration, plugins), config, runtime, new SPARCAddressLowering(codeCache));
+    protected HotSpotSuitesProvider createSuites(HotSpotVMConfig config, HotSpotGraalRuntimeProvider runtime, CompilerConfiguration compilerConfiguration, Plugins plugins) {
+        return new HotSpotSuitesProvider(new SPARCSuitesProvider(compilerConfiguration, plugins), config, runtime, new SPARCAddressLowering());
     }
 
     protected SPARCHotSpotBackend createBackend(HotSpotVMConfig config, HotSpotGraalRuntimeProvider runtime, HotSpotProviders providers) {
--- a/graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotLIRGenerator.java	Thu Jan 14 01:16:19 2016 +0100
+++ b/graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotLIRGenerator.java	Thu Jan 14 12:57:32 2016 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -129,8 +129,7 @@
     }
 
     private SPARCHotSpotLIRGenerator(HotSpotProviders providers, HotSpotVMConfig config, CallingConvention cc, LIRGenerationResult lirGenRes, ConstantTableBaseProvider constantTableBaseProvider) {
-        this(new SPARCHotSpotLIRKindTool(), new SPARCArithmeticLIRGenerator(), new SPARCHotSpotMoveFactory(providers.getCodeCache(), constantTableBaseProvider), providers, config, cc, lirGenRes,
-                        constantTableBaseProvider);
+        this(new SPARCHotSpotLIRKindTool(), new SPARCArithmeticLIRGenerator(), new SPARCHotSpotMoveFactory(constantTableBaseProvider), providers, config, cc, lirGenRes, constantTableBaseProvider);
     }
 
     public SPARCHotSpotLIRGenerator(LIRKindTool lirKindTool, SPARCArithmeticLIRGenerator arithmeticLIRGen, MoveFactory moveFactory, HotSpotProviders providers, HotSpotVMConfig config,
--- a/graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotMoveFactory.java	Thu Jan 14 01:16:19 2016 +0100
+++ b/graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotMoveFactory.java	Thu Jan 14 12:57:32 2016 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,6 @@
 import static jdk.vm.ci.hotspot.HotSpotCompressedNullConstant.COMPRESSED_NULL;
 import static jdk.vm.ci.meta.JavaConstant.INT_0;
 import static jdk.vm.ci.meta.JavaConstant.LONG_0;
-import jdk.vm.ci.code.CodeCacheProvider;
 import jdk.vm.ci.hotspot.HotSpotCompressedNullConstant;
 import jdk.vm.ci.hotspot.HotSpotConstant;
 import jdk.vm.ci.hotspot.HotSpotObjectConstant;
@@ -39,8 +38,8 @@
 
 public class SPARCHotSpotMoveFactory extends SPARCMoveFactory {
 
-    public SPARCHotSpotMoveFactory(CodeCacheProvider codeCache, ConstantTableBaseProvider constantTableBaseProvider) {
-        super(codeCache, constantTableBaseProvider);
+    public SPARCHotSpotMoveFactory(ConstantTableBaseProvider constantTableBaseProvider) {
+        super(constantTableBaseProvider);
     }
 
     @Override
--- a/graal/com.oracle.graal.lir.aarch64/src/com/oracle/graal/lir/aarch64/AArch64ControlFlow.java	Thu Jan 14 01:16:19 2016 +0100
+++ b/graal/com.oracle.graal.lir.aarch64/src/com/oracle/graal/lir/aarch64/AArch64ControlFlow.java	Thu Jan 14 12:57:32 2016 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -209,13 +209,7 @@
                     case Int:
                         long lc = jc.asLong();
                         assert NumUtil.isInt(lc);
-                        if (crb.codeCache.needsDataPatch(jc)) {
-                            crb.recordInlineDataInCode(jc);
-                            masm.forceMov(asRegister(scratch), (int) lc);
-                            masm.cmp(32, asRegister(key), asRegister(scratch));
-                        } else {
-                            emitCompare(crb, masm, key, scratch, constVal);
-                        }
+                        emitCompare(crb, masm, key, scratch, constVal);
                         break;
                     case Long:
                         emitCompare(crb, masm, key, scratch, constVal);
--- a/graal/com.oracle.graal.lir.aarch64/src/com/oracle/graal/lir/aarch64/AArch64Move.java	Thu Jan 14 01:16:19 2016 +0100
+++ b/graal/com.oracle.graal.lir.aarch64/src/com/oracle/graal/lir/aarch64/AArch64Move.java	Thu Jan 14 12:57:32 2016 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -489,20 +489,10 @@
         Register dst = asRegister(result);
         switch (input.getJavaKind().getStackKind()) {
             case Int:
-                if (crb.codeCache.needsDataPatch(input)) {
-                    crb.recordInlineDataInCode(input);
-                    masm.forceMov(dst, input.asInt());
-                } else {
-                    masm.mov(dst, input.asInt());
-                }
+                masm.mov(dst, input.asInt());
                 break;
             case Long:
-                if (crb.codeCache.needsDataPatch(input)) {
-                    crb.recordInlineDataInCode(input);
-                    masm.forceMov(dst, input.asLong());
-                } else {
-                    masm.mov(dst, input.asLong());
-                }
+                masm.mov(dst, input.asLong());
                 break;
             case Float:
                 if (AArch64MacroAssembler.isFloatImmediate(input.asFloat())) {
--- a/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64ControlFlow.java	Thu Jan 14 01:16:19 2016 +0100
+++ b/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64ControlFlow.java	Thu Jan 14 12:57:32 2016 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -188,9 +188,6 @@
                 JavaConstant jc = (JavaConstant) c;
                 switch (jc.getJavaKind()) {
                     case Int:
-                        if (crb.codeCache.needsDataPatch(jc)) {
-                            crb.recordInlineDataInCode(jc);
-                        }
                         long lc = jc.asLong();
                         assert NumUtil.isInt(lc);
                         masm.cmpl(keyRegister, (int) lc);
--- a/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64Move.java	Thu Jan 14 01:16:19 2016 +0100
+++ b/graal/com.oracle.graal.lir.amd64/src/com/oracle/graal/lir/amd64/AMD64Move.java	Thu Jan 14 12:57:32 2016 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -609,9 +609,6 @@
          */
         switch (input.getJavaKind().getStackKind()) {
             case Int:
-                if (crb.codeCache.needsDataPatch(input)) {
-                    crb.recordInlineDataInCode(input);
-                }
                 // Do not optimize with an XOR as this instruction may be between
                 // a CMP and a Jcc in which case the XOR will modify the condition
                 // flags and interfere with the Jcc.
@@ -619,32 +616,22 @@
 
                 break;
             case Long:
-                boolean patch = false;
-                if (crb.codeCache.needsDataPatch(input)) {
-                    patch = true;
-                    crb.recordInlineDataInCode(input);
-                }
                 // Do not optimize with an XOR as this instruction may be between
                 // a CMP and a Jcc in which case the XOR will modify the condition
                 // flags and interfere with the Jcc.
-                if (patch) {
-                    masm.movq(result, input.asLong());
+                if (input.asLong() == (int) input.asLong()) {
+                    // Sign extended to long
+                    masm.movslq(result, (int) input.asLong());
+                } else if ((input.asLong() & 0xFFFFFFFFL) == input.asLong()) {
+                    // Zero extended to long
+                    masm.movl(result, (int) input.asLong());
                 } else {
-                    if (input.asLong() == (int) input.asLong()) {
-                        // Sign extended to long
-                        masm.movslq(result, (int) input.asLong());
-                    } else if ((input.asLong() & 0xFFFFFFFFL) == input.asLong()) {
-                        // Zero extended to long
-                        masm.movl(result, (int) input.asLong());
-                    } else {
-                        masm.movq(result, input.asLong());
-                    }
+                    masm.movq(result, input.asLong());
                 }
                 break;
             case Float:
                 // This is *not* the same as 'constant == 0.0f' in the case where constant is -0.0f
                 if (Float.floatToRawIntBits(input.asFloat()) == Float.floatToRawIntBits(0.0f)) {
-                    assert !crb.codeCache.needsDataPatch(input);
                     masm.xorps(result, result);
                 } else {
                     masm.movflt(result, (AMD64Address) crb.asFloatConstRef(input));
@@ -653,7 +640,6 @@
             case Double:
                 // This is *not* the same as 'constant == 0.0d' in the case where constant is -0.0d
                 if (Double.doubleToRawLongBits(input.asDouble()) == Double.doubleToRawLongBits(0.0d)) {
-                    assert !crb.codeCache.needsDataPatch(input);
                     masm.xorpd(result, result);
                 } else {
                     masm.movdbl(result, (AMD64Address) crb.asDoubleConstRef(input));
@@ -678,7 +664,6 @@
     }
 
     public static void const2stack(CompilationResultBuilder crb, AMD64MacroAssembler masm, Value result, JavaConstant input) {
-        assert !crb.codeCache.needsDataPatch(input);
         AMD64Address dest = (AMD64Address) crb.asAddress(result);
         final long imm;
         switch (input.getJavaKind().getStackKind()) {
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/asm/CompilationResultBuilder.java	Thu Jan 14 01:16:19 2016 +0100
+++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/asm/CompilationResultBuilder.java	Thu Jan 14 12:57:32 2016 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -249,7 +249,6 @@
     public int asIntConst(Value value) {
         assert isJavaConstant(value) && asJavaConstant(value).getJavaKind().isNumericInteger();
         JavaConstant constant = asJavaConstant(value);
-        assert !codeCache.needsDataPatch(constant) : constant + " should be in a DataPatch";
         long c = constant.asLong();
         if (!NumUtil.isInt(c)) {
             throw JVMCIError.shouldNotReachHere();
@@ -263,7 +262,6 @@
     public float asFloatConst(Value value) {
         assert isJavaConstant(value) && asJavaConstant(value).getJavaKind() == JavaKind.Float;
         JavaConstant constant = asJavaConstant(value);
-        assert !codeCache.needsDataPatch(constant) : constant + " should be in a DataPatch";
         return constant.asFloat();
     }
 
@@ -273,7 +271,6 @@
     public long asLongConst(Value value) {
         assert isJavaConstant(value) && asJavaConstant(value).getJavaKind() == JavaKind.Long;
         JavaConstant constant = asJavaConstant(value);
-        assert !codeCache.needsDataPatch(constant) : constant + " should be in a DataPatch";
         return constant.asLong();
     }
 
@@ -283,7 +280,6 @@
     public double asDoubleConst(Value value) {
         assert isJavaConstant(value) && asJavaConstant(value).getJavaKind() == JavaKind.Double;
         JavaConstant constant = asJavaConstant(value);
-        assert !codeCache.needsDataPatch(constant) : constant + " should be in a DataPatch";
         return constant.asDouble();
     }