changeset 13378:16d99e9d77ad

Options: rename flag (AOTCompilation -> ImmutableCode)
author Bernhard Urban <bernhard.urban@jku.at>
date Wed, 18 Dec 2013 11:13:17 +0100
parents 40530019af02
children 6a4160635fef
files graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/HighTier.java graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/LowTier.java graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/MidTier.java graal/com.oracle.graal.hotspot.test/src/com/oracle/graal/hotspot/test/AheadOfTimeCompilationTest.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotResolvedJavaField.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotSuitesProvider.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/ObjectGetClassNode.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/SystemSubstitutions.java graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/InliningUtil.java graal/com.oracle.graal.phases/src/com/oracle/graal/phases/GraalOptions.java graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/BoxingSnippets.java graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/CompositeValueClassSubstitutions.java graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/NodeClassSubstitutions.java graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/PartialEvaluator.java graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleCache.java mx/mx_graal.py
diffstat 16 files changed, 20 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/HighTier.java	Wed Dec 18 09:02:01 2013 +0100
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/HighTier.java	Wed Dec 18 11:13:17 2013 +0100
@@ -48,7 +48,7 @@
     }
 
     public HighTier() {
-        CanonicalizerPhase canonicalizer = new CanonicalizerPhase(!AOTCompilation.getValue());
+        CanonicalizerPhase canonicalizer = new CanonicalizerPhase(!ImmutableCode.getValue());
 
         if (VerifyUsageWithEquals.getValue()) {
             appendPhase(new VerifyUsageWithEquals(Value.class));
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/LowTier.java	Wed Dec 18 09:02:01 2013 +0100
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/LowTier.java	Wed Dec 18 11:13:17 2013 +0100
@@ -31,7 +31,7 @@
 public class LowTier extends PhaseSuite<LowTierContext> {
 
     public LowTier() {
-        CanonicalizerPhase canonicalizer = new CanonicalizerPhase(!AOTCompilation.getValue());
+        CanonicalizerPhase canonicalizer = new CanonicalizerPhase(!ImmutableCode.getValue());
 
         appendPhase(new LoweringPhase(canonicalizer));
 
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/MidTier.java	Wed Dec 18 09:02:01 2013 +0100
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/MidTier.java	Wed Dec 18 11:13:17 2013 +0100
@@ -33,7 +33,7 @@
 public class MidTier extends PhaseSuite<MidTierContext> {
 
     public MidTier() {
-        CanonicalizerPhase canonicalizer = new CanonicalizerPhase(!AOTCompilation.getValue());
+        CanonicalizerPhase canonicalizer = new CanonicalizerPhase(!ImmutableCode.getValue());
 
         if (OptPushThroughPi.getValue()) {
             appendPhase(new PushThroughPiPhase());
--- a/graal/com.oracle.graal.hotspot.test/src/com/oracle/graal/hotspot/test/AheadOfTimeCompilationTest.java	Wed Dec 18 09:02:01 2013 +0100
+++ b/graal/com.oracle.graal.hotspot.test/src/com/oracle/graal/hotspot/test/AheadOfTimeCompilationTest.java	Wed Dec 18 11:13:17 2013 +0100
@@ -201,7 +201,7 @@
         StructuredGraph graph = parse(test);
         ResolvedJavaMethod method = graph.method();
 
-        try (OverrideScope s = OptionValue.override(AOTCompilation, compileAOT)) {
+        try (OverrideScope s = OptionValue.override(ImmutableCode, compileAOT)) {
             PhasePlan phasePlan = new PhasePlan();
             GraphBuilderPhase graphBuilderPhase = new GraphBuilderPhase(getMetaAccess(), getForeignCalls(), GraphBuilderConfiguration.getDefault(), OptimisticOptimizations.ALL);
             phasePlan.addPhase(PhasePosition.AFTER_PARSING, graphBuilderPhase);
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotResolvedJavaField.java	Wed Dec 18 09:02:01 2013 +0100
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotResolvedJavaField.java	Wed Dec 18 11:13:17 2013 +0100
@@ -160,7 +160,7 @@
      * in AOT mode, some fields should never be embedded even for snippets/replacements.
      */
     private boolean isEmbeddable() {
-        if (AOTCompilation.getValue() && notEmbeddable.contains(this)) {
+        if (ImmutableCode.getValue() && notEmbeddable.contains(this)) {
             return false;
         }
         return true;
@@ -176,7 +176,7 @@
      */
     @Override
     public Constant readConstantValue(Constant receiver) {
-        assert !AOTCompilation.getValue() || isCalledForSnippets() : receiver;
+        assert !ImmutableCode.getValue() || isCalledForSnippets() : receiver;
 
         if (receiver == null) {
             assert Modifier.isStatic(modifiers);
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotSuitesProvider.java	Wed Dec 18 09:02:01 2013 +0100
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotSuitesProvider.java	Wed Dec 18 11:13:17 2013 +0100
@@ -48,7 +48,7 @@
     public Suites createSuites() {
         Suites ret = Suites.createDefaultSuites();
 
-        if (AOTCompilation.getValue()) {
+        if (ImmutableCode.getValue()) {
             // lowering introduces class constants, therefore it must be after lowering
             ret.getHighTier().appendPhase(new LoadJavaMirrorWithKlassPhase(runtime.getConfig().classMirrorOffset));
             if (VerifyPhases.getValue()) {
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/ObjectGetClassNode.java	Wed Dec 18 09:02:01 2013 +0100
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/ObjectGetClassNode.java	Wed Dec 18 11:13:17 2013 +0100
@@ -49,7 +49,7 @@
 
     @Override
     public void virtualize(VirtualizerTool tool) {
-        if (AOTCompilation.getValue()) {
+        if (ImmutableCode.getValue()) {
             return;
         }
         State state = tool.getObjectState(getObject());
@@ -61,7 +61,7 @@
 
     @Override
     public Node canonical(CanonicalizerTool tool) {
-        if (AOTCompilation.getValue()) {
+        if (ImmutableCode.getValue()) {
             return this;
         }
         if (usages().isEmpty()) {
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/SystemSubstitutions.java	Wed Dec 18 09:02:01 2013 +0100
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/SystemSubstitutions.java	Wed Dec 18 11:13:17 2013 +0100
@@ -65,7 +65,7 @@
 
         @Override
         protected Constant evaluate(Constant param, MetaAccessProvider metaAccess) {
-            return AOTCompilation.getValue() || param.isNull() ? null : Constant.forInt(System.identityHashCode(param.asObject()));
+            return ImmutableCode.getValue() || param.isNull() ? null : Constant.forInt(System.identityHashCode(param.asObject()));
         }
     }
 
--- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/InliningUtil.java	Wed Dec 18 09:02:01 2013 +0100
+++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/InliningUtil.java	Wed Dec 18 11:13:17 2013 +0100
@@ -711,7 +711,7 @@
                     metricInliningTailDuplication.increment();
                     Debug.log("MultiTypeGuardInlineInfo starting tail duplication (%d opportunities)", opportunities);
                     PhaseContext phaseContext = new PhaseContext(providers, assumptions);
-                    CanonicalizerPhase canonicalizer = new CanonicalizerPhase(!AOTCompilation.getValue());
+                    CanonicalizerPhase canonicalizer = new CanonicalizerPhase(!ImmutableCode.getValue());
                     TailDuplicationPhase.tailDuplicate(returnMerge, TailDuplicationPhase.TRUE_DECISION, replacementNodes, phaseContext, canonicalizer);
                 }
             }
--- a/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/GraalOptions.java	Wed Dec 18 09:02:01 2013 +0100
+++ b/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/GraalOptions.java	Wed Dec 18 11:13:17 2013 +0100
@@ -229,8 +229,8 @@
     public static final OptionValue<Double> MinTableSwitchDensity = new OptionValue<>(0.5);
 
     // Ahead of time compilation
-    @Option(help = "Configure compiler to emit code  compatible with AOT requirements for HotSpot")
-    public static final OptionValue<Boolean> AOTCompilation = new OptionValue<>(false);
+    @Option(help = "Try to avoid emitting code where patching is required")
+    public static final OptionValue<Boolean> ImmutableCode = new OptionValue<>(false);
 
     // Runtime settings
     @Option(help = "")
--- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/BoxingSnippets.java	Wed Dec 18 09:02:01 2013 +0100
+++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/BoxingSnippets.java	Wed Dec 18 11:13:17 2013 +0100
@@ -218,7 +218,7 @@
         public void lower(BoxNode box, LoweringTool tool) {
             FloatingNode canonical = canonicalizeBoxing(box, providers.getMetaAccess());
             // if in AOT mode, we don't want to embed boxed constants.
-            if (canonical != null && !AOTCompilation.getValue()) {
+            if (canonical != null && !ImmutableCode.getValue()) {
                 box.graph().replaceFloating(box, canonical);
             } else {
                 Arguments args = new Arguments(boxSnippets.get(box.getBoxingKind()), box.graph().getGuardsStage());
--- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/CompositeValueClassSubstitutions.java	Wed Dec 18 09:02:01 2013 +0100
+++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/CompositeValueClassSubstitutions.java	Wed Dec 18 11:13:17 2013 +0100
@@ -51,7 +51,7 @@
         @SuppressWarnings("unchecked")
         @Override
         protected Constant evaluate(Constant param, MetaAccessProvider metaAccess) {
-            if (param.isNull() || AOTCompilation.getValue()) {
+            if (param.isNull() || ImmutableCode.getValue()) {
                 return null;
             }
             return Constant.forObject(CompositeValueClass.get((Class<? extends CompositeValue>) param.asObject()));
--- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/NodeClassSubstitutions.java	Wed Dec 18 09:02:01 2013 +0100
+++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/NodeClassSubstitutions.java	Wed Dec 18 11:13:17 2013 +0100
@@ -55,7 +55,7 @@
 
         @Override
         protected Constant evaluate(Constant param, MetaAccessProvider metaAccess) {
-            return param.isNull() || AOTCompilation.getValue() ? null : Constant.forObject(NodeClass.get((Class<?>) param.asObject()));
+            return param.isNull() || ImmutableCode.getValue() ? null : Constant.forObject(NodeClass.get((Class<?>) param.asObject()));
         }
     }
 
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/PartialEvaluator.java	Wed Dec 18 09:02:01 2013 +0100
+++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/PartialEvaluator.java	Wed Dec 18 11:13:17 2013 +0100
@@ -76,7 +76,7 @@
     public PartialEvaluator(RuntimeProvider runtime, Providers providers, TruffleCache truffleCache) {
         this.providers = providers;
         CustomCanonicalizer customCanonicalizer = new PartialEvaluatorCanonicalizer(providers.getMetaAccess(), providers.getConstantReflection());
-        this.canonicalizer = new CanonicalizerPhase(!AOTCompilation.getValue(), customCanonicalizer);
+        this.canonicalizer = new CanonicalizerPhase(!ImmutableCode.getValue(), customCanonicalizer);
         this.skippedExceptionTypes = TruffleCompilerImpl.getSkippedExceptionTypes(providers.getMetaAccess());
         this.cache = runtime.getGraphCache();
         this.truffleCache = truffleCache;
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleCache.java	Wed Dec 18 09:02:01 2013 +0100
+++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleCache.java	Wed Dec 18 11:13:17 2013 +0100
@@ -110,7 +110,7 @@
             // Convert deopt to guards.
             new ConvertDeoptimizeToGuardPhase().apply(graph);
 
-            CanonicalizerPhase canonicalizerPhase = new CanonicalizerPhase(!AOTCompilation.getValue());
+            CanonicalizerPhase canonicalizerPhase = new CanonicalizerPhase(!ImmutableCode.getValue());
             PartialEscapePhase partialEscapePhase = new PartialEscapePhase(false, canonicalizerPhase);
 
             Mark mark = null;
--- a/mx/mx_graal.py	Wed Dec 18 09:02:01 2013 +0100
+++ b/mx/mx_graal.py	Wed Dec 18 11:13:17 2013 +0100
@@ -970,8 +970,8 @@
         tasks.append(t.stop())
 
     with VM('graal', 'product'):
-        t = Task('BootstrapWithAOTConfiguration:product')
-        vm(['-G:+AOTCompilation', '-G:+VerifyPhases', '-esa', '-version'])
+        t = Task('BootstrapWithImmutableCode:product')
+        vm(['-G:+ImmutableCode', '-G:+VerifyPhases', '-esa', '-version'])
         tasks.append(t.stop())
 
     with VM('server', 'product'):  # hosted mode