# HG changeset patch # User Bernhard Urban # Date 1387361597 -3600 # Node ID 16d99e9d77ad4d9282e686a84e87403ebd957d15 # Parent 40530019af024ad7ac77c392a161a6ad91ed50cb Options: rename flag (AOTCompilation -> ImmutableCode) diff -r 40530019af02 -r 16d99e9d77ad graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/HighTier.java --- 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)); diff -r 40530019af02 -r 16d99e9d77ad graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/LowTier.java --- 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 { public LowTier() { - CanonicalizerPhase canonicalizer = new CanonicalizerPhase(!AOTCompilation.getValue()); + CanonicalizerPhase canonicalizer = new CanonicalizerPhase(!ImmutableCode.getValue()); appendPhase(new LoweringPhase(canonicalizer)); diff -r 40530019af02 -r 16d99e9d77ad graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/MidTier.java --- 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 { public MidTier() { - CanonicalizerPhase canonicalizer = new CanonicalizerPhase(!AOTCompilation.getValue()); + CanonicalizerPhase canonicalizer = new CanonicalizerPhase(!ImmutableCode.getValue()); if (OptPushThroughPi.getValue()) { appendPhase(new PushThroughPiPhase()); diff -r 40530019af02 -r 16d99e9d77ad graal/com.oracle.graal.hotspot.test/src/com/oracle/graal/hotspot/test/AheadOfTimeCompilationTest.java --- 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); diff -r 40530019af02 -r 16d99e9d77ad graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotResolvedJavaField.java --- 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); diff -r 40530019af02 -r 16d99e9d77ad graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotSuitesProvider.java --- 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()) { diff -r 40530019af02 -r 16d99e9d77ad graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/ObjectGetClassNode.java --- 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()) { diff -r 40530019af02 -r 16d99e9d77ad graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/SystemSubstitutions.java --- 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())); } } diff -r 40530019af02 -r 16d99e9d77ad graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/InliningUtil.java --- 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); } } diff -r 40530019af02 -r 16d99e9d77ad graal/com.oracle.graal.phases/src/com/oracle/graal/phases/GraalOptions.java --- 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 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 AOTCompilation = new OptionValue<>(false); + @Option(help = "Try to avoid emitting code where patching is required") + public static final OptionValue ImmutableCode = new OptionValue<>(false); // Runtime settings @Option(help = "") diff -r 40530019af02 -r 16d99e9d77ad graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/BoxingSnippets.java --- 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()); diff -r 40530019af02 -r 16d99e9d77ad graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/CompositeValueClassSubstitutions.java --- 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) param.asObject())); diff -r 40530019af02 -r 16d99e9d77ad graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/NodeClassSubstitutions.java --- 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())); } } diff -r 40530019af02 -r 16d99e9d77ad graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/PartialEvaluator.java --- 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; diff -r 40530019af02 -r 16d99e9d77ad graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleCache.java --- 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; diff -r 40530019af02 -r 16d99e9d77ad mx/mx_graal.py --- 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