use of org.graalvm.compiler.phases.tiers.HighTierContext in project graal by oracle.
the class GraalCompilerTest method getCustomGraphBuilderSuite.
protected PhaseSuite<HighTierContext> getCustomGraphBuilderSuite(GraphBuilderConfiguration gbConf) {
PhaseSuite<HighTierContext> suite = getDefaultGraphBuilderSuite();
ListIterator<BasePhase<? super HighTierContext>> iterator = suite.findPhase(GraphBuilderPhase.class);
initializeInvocationPluginExtensions();
GraphBuilderConfiguration gbConfCopy = editGraphBuilderConfiguration(gbConf.copy());
iterator.remove();
iterator.add(new GraphBuilderPhase(gbConfCopy));
return suite;
}
use of org.graalvm.compiler.phases.tiers.HighTierContext in project graal by oracle.
the class GuardPrioritiesTest method prepareGraph.
private StructuredGraph prepareGraph(String method) {
StructuredGraph graph = parseEager(method, StructuredGraph.AllowAssumptions.YES);
HighTierContext highTierContext = getDefaultHighTierContext();
CanonicalizerPhase canonicalizer = new CanonicalizerPhase();
new ConvertDeoptimizeToGuardPhase().apply(graph, highTierContext);
new LoweringPhase(canonicalizer, LoweringTool.StandardLoweringStage.HIGH_TIER).apply(graph, highTierContext);
new FloatingReadPhase().apply(graph);
return graph;
}
use of org.graalvm.compiler.phases.tiers.HighTierContext in project graal by oracle.
the class BoxingEliminationTest method compareGraphs.
private void compareGraphs(final String snippet, final String referenceSnippet, final boolean loopPeeling, final boolean excludeVirtual) {
graph = parseEager(snippet, AllowAssumptions.NO);
HighTierContext context = getDefaultHighTierContext();
CanonicalizerPhase canonicalizer = new CanonicalizerPhase();
canonicalizer.apply(graph, context);
new InliningPhase(new CanonicalizerPhase()).apply(graph, context);
if (loopPeeling) {
new LoopPeelingPhase(new DefaultLoopPolicies()).apply(graph, context);
}
new DeadCodeEliminationPhase().apply(graph);
canonicalizer.apply(graph, context);
new PartialEscapePhase(false, canonicalizer, graph.getOptions()).apply(graph, context);
new DeadCodeEliminationPhase().apply(graph);
canonicalizer.apply(graph, context);
StructuredGraph referenceGraph = parseEager(referenceSnippet, AllowAssumptions.YES);
new InliningPhase(new CanonicalizerPhase()).apply(referenceGraph, context);
new DeadCodeEliminationPhase().apply(referenceGraph);
new CanonicalizerPhase().apply(referenceGraph, context);
assertEquals(referenceGraph, graph, excludeVirtual, true);
}
use of org.graalvm.compiler.phases.tiers.HighTierContext in project graal by oracle.
the class BoxingEliminationTest method processMethod.
private void processMethod(final String snippet) {
graph = parseEager(snippet, AllowAssumptions.NO);
HighTierContext context = getDefaultHighTierContext();
new InliningPhase(new CanonicalizerPhase()).apply(graph, context);
new PartialEscapePhase(false, new CanonicalizerPhase(), graph.getOptions()).apply(graph, context);
}
use of org.graalvm.compiler.phases.tiers.HighTierContext in project graal by oracle.
the class ConditionalEliminationMulTest method prepareGraph.
private StructuredGraph prepareGraph(String snippet) {
StructuredGraph graph = parseEager(snippet, AllowAssumptions.NO);
HighTierContext context = getDefaultHighTierContext();
new ConditionalEliminationPhase(false).apply(graph, context);
CanonicalizerPhase c = new CanonicalizerPhase();
c.apply(graph, context);
new ConditionalEliminationPhase(false).apply(graph, context);
c.apply(graph, context);
return graph;
}
Aggregations