Search in sources :

Example 1 with AOTInliningPolicy

use of org.graalvm.compiler.hotspot.phases.aot.AOTInliningPolicy in project graal by oracle.

the class HotSpotSuitesProvider method createSuites.

@Override
public Suites createSuites(OptionValues options) {
    Suites ret = defaultSuitesCreator.createSuites(options);
    if (ImmutableCode.getValue(options)) {
        // lowering introduces class constants, therefore it must be after lowering
        ret.getHighTier().appendPhase(new LoadJavaMirrorWithKlassPhase(config));
        if (VerifyPhases.getValue(options)) {
            ret.getHighTier().appendPhase(new AheadOfTimeVerificationPhase());
        }
        if (GeneratePIC.getValue(options)) {
            ListIterator<BasePhase<? super HighTierContext>> highTierLowering = ret.getHighTier().findPhase(LoweringPhase.class);
            highTierLowering.previous();
            highTierLowering.add(new EliminateRedundantInitializationPhase());
            if (HotSpotAOTProfilingPlugin.Options.TieredAOT.getValue(options)) {
                highTierLowering.add(new FinalizeProfileNodesPhase(HotSpotAOTProfilingPlugin.Options.TierAInvokeInlineeNotifyFreqLog.getValue(options)));
            }
            ListIterator<BasePhase<? super MidTierContext>> midTierLowering = ret.getMidTier().findPhase(LoweringPhase.class);
            midTierLowering.add(new ReplaceConstantNodesPhase());
            // Replace inlining policy
            if (Inline.getValue(options)) {
                ListIterator<BasePhase<? super HighTierContext>> iter = ret.getHighTier().findPhase(InliningPhase.class);
                InliningPhase inlining = (InliningPhase) iter.previous();
                CanonicalizerPhase canonicalizer = inlining.getCanonicalizer();
                iter.set(new InliningPhase(new AOTInliningPolicy(null), canonicalizer));
            }
        }
    }
    ret.getMidTier().appendPhase(new WriteBarrierAdditionPhase(config));
    if (VerifyPhases.getValue(options)) {
        ret.getMidTier().appendPhase(new WriteBarrierVerificationPhase(config));
    }
    return ret;
}
Also used : EliminateRedundantInitializationPhase(org.graalvm.compiler.hotspot.phases.aot.EliminateRedundantInitializationPhase) WriteBarrierVerificationPhase(org.graalvm.compiler.hotspot.phases.WriteBarrierVerificationPhase) WriteBarrierAdditionPhase(org.graalvm.compiler.hotspot.phases.WriteBarrierAdditionPhase) FinalizeProfileNodesPhase(org.graalvm.compiler.hotspot.phases.profiling.FinalizeProfileNodesPhase) AOTInliningPolicy(org.graalvm.compiler.hotspot.phases.aot.AOTInliningPolicy) ReplaceConstantNodesPhase(org.graalvm.compiler.hotspot.phases.aot.ReplaceConstantNodesPhase) AheadOfTimeVerificationPhase(org.graalvm.compiler.hotspot.phases.AheadOfTimeVerificationPhase) MidTierContext(org.graalvm.compiler.phases.tiers.MidTierContext) LoadJavaMirrorWithKlassPhase(org.graalvm.compiler.hotspot.phases.LoadJavaMirrorWithKlassPhase) CanonicalizerPhase(org.graalvm.compiler.phases.common.CanonicalizerPhase) HighTierContext(org.graalvm.compiler.phases.tiers.HighTierContext) InliningPhase(org.graalvm.compiler.phases.common.inlining.InliningPhase) BasePhase(org.graalvm.compiler.phases.BasePhase) LIRSuites(org.graalvm.compiler.lir.phases.LIRSuites) Suites(org.graalvm.compiler.phases.tiers.Suites)

Aggregations

AheadOfTimeVerificationPhase (org.graalvm.compiler.hotspot.phases.AheadOfTimeVerificationPhase)1 LoadJavaMirrorWithKlassPhase (org.graalvm.compiler.hotspot.phases.LoadJavaMirrorWithKlassPhase)1 WriteBarrierAdditionPhase (org.graalvm.compiler.hotspot.phases.WriteBarrierAdditionPhase)1 WriteBarrierVerificationPhase (org.graalvm.compiler.hotspot.phases.WriteBarrierVerificationPhase)1 AOTInliningPolicy (org.graalvm.compiler.hotspot.phases.aot.AOTInliningPolicy)1 EliminateRedundantInitializationPhase (org.graalvm.compiler.hotspot.phases.aot.EliminateRedundantInitializationPhase)1 ReplaceConstantNodesPhase (org.graalvm.compiler.hotspot.phases.aot.ReplaceConstantNodesPhase)1 FinalizeProfileNodesPhase (org.graalvm.compiler.hotspot.phases.profiling.FinalizeProfileNodesPhase)1 LIRSuites (org.graalvm.compiler.lir.phases.LIRSuites)1 BasePhase (org.graalvm.compiler.phases.BasePhase)1 CanonicalizerPhase (org.graalvm.compiler.phases.common.CanonicalizerPhase)1 InliningPhase (org.graalvm.compiler.phases.common.inlining.InliningPhase)1 HighTierContext (org.graalvm.compiler.phases.tiers.HighTierContext)1 MidTierContext (org.graalvm.compiler.phases.tiers.MidTierContext)1 Suites (org.graalvm.compiler.phases.tiers.Suites)1