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;
}
Aggregations