Mercurial > hg > graal-jvmci-8
changeset 9907:7e0a3f8fbd70
CanonicalizerPhase: add phase that obtains the canonicalizer from the context
author | Bernhard Urban <bernhard.urban@jku.at> |
---|---|
date | Thu, 06 Jun 2013 09:26:02 +0200 |
parents | fc93d919f896 |
children | 91295caf53b6 |
files | graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/HighTier.java graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/MidTier.java graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/CanonicalizerPhase.java |
diffstat | 3 files changed, 13 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/HighTier.java Wed Jun 05 21:17:38 2013 +0200 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/HighTier.java Thu Jun 06 09:26:02 2013 +0200 @@ -63,7 +63,7 @@ } if (OptCanonicalizer.getValue()) { - addPhase(new CanonicalizerPhase()); + addPhase(new CanonicalizerPhase.Context()); } addPhase(new LoweringPhase(LoweringType.BEFORE_GUARDS));
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/MidTier.java Wed Jun 05 21:17:38 2013 +0200 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/MidTier.java Thu Jun 06 09:26:02 2013 +0200 @@ -35,7 +35,7 @@ if (OptPushThroughPi.getValue()) { addPhase(new PushThroughPiPhase()); if (OptCanonicalizer.getValue()) { - addPhase(new CanonicalizerPhase()); + addPhase(new CanonicalizerPhase.Context()); } } @@ -50,7 +50,7 @@ addPhase(new RemoveValueProxyPhase()); if (OptCanonicalizer.getValue()) { - addPhase(new CanonicalizerPhase()); + addPhase(new CanonicalizerPhase.Context()); } if (OptEliminatePartiallyRedundantGuards.getValue()) { @@ -66,7 +66,7 @@ } if (OptCanonicalizer.getValue()) { - addPhase(new CanonicalizerPhase()); + addPhase(new CanonicalizerPhase.Context()); } addPhase(new LoopSafepointEliminationPhase()); @@ -76,7 +76,7 @@ addPhase(new GuardLoweringPhase()); if (OptCanonicalizer.getValue()) { - addPhase(new CanonicalizerPhase()); + addPhase(new CanonicalizerPhase.Context()); } } }
--- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/CanonicalizerPhase.java Wed Jun 05 21:17:38 2013 +0200 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/CanonicalizerPhase.java Thu Jun 06 09:26:02 2013 +0200 @@ -344,4 +344,12 @@ } } } + + public static class Context extends BasePhase<PhaseContext> { + + @Override + protected void run(StructuredGraph graph, PhaseContext context) { + context.applyCanonicalizer(graph); + } + } }