# HG changeset patch # User Bernhard Urban # Date 1370871686 -7200 # Node ID 6b6d34f83eb12ce3af072b1092fb5aa242ced684 # Parent 4158612eca6019114a6a7b8304d97400df25c6a1 IterativeInliningPhase: obtain replacements from context diff -r 4158612eca60 -r 6b6d34f83eb1 graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/ea/IterativeInliningTest.java --- a/graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/ea/IterativeInliningTest.java Mon Jun 10 15:41:23 2013 +0200 +++ b/graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/ea/IterativeInliningTest.java Mon Jun 10 15:41:26 2013 +0200 @@ -89,6 +89,6 @@ private void processMethod(final String snippet) { graph = parse(snippet); HighTierContext context = new HighTierContext(runtime(), new Assumptions(false), replacements); - new IterativeInliningPhase(replacements, null, getDefaultPhasePlan(), OptimisticOptimizations.ALL, new CanonicalizerPhase(true)).apply(graph, context); + new IterativeInliningPhase(null, getDefaultPhasePlan(), OptimisticOptimizations.ALL, new CanonicalizerPhase(true)).apply(graph, context); } } diff -r 4158612eca60 -r 6b6d34f83eb1 graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalCompiler.java --- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalCompiler.java Mon Jun 10 15:41:23 2013 +0200 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalCompiler.java Mon Jun 10 15:41:26 2013 +0200 @@ -150,7 +150,7 @@ if (Inline.getValue() && !plan.isPhaseDisabled(InliningPhase.class)) { if (IterativeInlining.getValue()) { - new IterativeInliningPhase(replacements, cache, plan, optimisticOpts, canonicalizer).apply(graph, highTierContext); + new IterativeInliningPhase(cache, plan, optimisticOpts, canonicalizer).apply(graph, highTierContext); } else { new InliningPhase(runtime, null, replacements, assumptions, cache, plan, optimisticOpts).apply(graph); new DeadCodeEliminationPhase().apply(graph); diff -r 4158612eca60 -r 6b6d34f83eb1 graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/phases/ea/IterativeInliningPhase.java --- a/graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/phases/ea/IterativeInliningPhase.java Mon Jun 10 15:41:23 2013 +0200 +++ b/graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/phases/ea/IterativeInliningPhase.java Mon Jun 10 15:41:26 2013 +0200 @@ -38,13 +38,11 @@ private final PhasePlan plan; - private final Replacements replacements; private final GraphCache cache; private final OptimisticOptimizations optimisticOpts; private final CanonicalizerPhase canonicalizer; - public IterativeInliningPhase(Replacements replacements, GraphCache cache, PhasePlan plan, OptimisticOptimizations optimisticOpts, CanonicalizerPhase canonicalizer) { - this.replacements = replacements; + public IterativeInliningPhase(GraphCache cache, PhasePlan plan, OptimisticOptimizations optimisticOpts, CanonicalizerPhase canonicalizer) { this.cache = cache; this.plan = plan; this.optimisticOpts = optimisticOpts; @@ -77,7 +75,7 @@ Map hints = PEAInliningHints.getValue() ? PartialEscapePhase.getHints(graph) : null; - InliningPhase inlining = new InliningPhase(context.getRuntime(), hints, replacements, context.getAssumptions(), cache, plan, optimisticOpts); + InliningPhase inlining = new InliningPhase(context.getRuntime(), hints, context.getReplacements(), context.getAssumptions(), cache, plan, optimisticOpts); inlining.setMaxMethodsPerInlining(simple ? 1 : Integer.MAX_VALUE); inlining.apply(graph); progress |= inlining.getInliningCount() > 0;