Mercurial > hg > truffle
changeset 15949:4243a6b8dd19
Fix insertion of profile data in unit tests.
author | Roland Schatz <roland.schatz@oracle.com> |
---|---|
date | Wed, 28 May 2014 12:17:09 +0200 |
parents | 6abfac153606 |
children | e4567f9acc42 |
files | graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/GraalCompilerTest.java |
diffstat | 1 files changed, 15 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/GraalCompilerTest.java Wed May 28 12:17:00 2014 +0200 +++ b/graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/GraalCompilerTest.java Wed May 28 12:17:09 2014 +0200 @@ -53,6 +53,7 @@ import com.oracle.graal.nodes.spi.*; import com.oracle.graal.nodes.virtual.*; import com.oracle.graal.phases.*; +import com.oracle.graal.phases.common.inlining.*; import com.oracle.graal.phases.schedule.*; import com.oracle.graal.phases.tiers.*; import com.oracle.graal.phases.util.*; @@ -94,10 +95,22 @@ } } + protected Suites createSuites() { + Suites ret = backend.getSuites().createSuites(); + ret.getHighTier().findPhase(InliningPhase.class).add(new Phase("ComputeLoopFrequenciesPhase") { + + @Override + protected void run(StructuredGraph graph) { + ComputeLoopFrequenciesClosure.compute(graph); + } + }); + return ret; + } + public GraalCompilerTest() { this.backend = Graal.getRequiredCapability(RuntimeProvider.class).getHostBackend(); this.providers = getBackend().getProviders(); - this.suites = backend.getSuites().createSuites(); + this.suites = createSuites(); installSubstitutions(); } @@ -117,7 +130,7 @@ this.backend = runtime.getHostBackend(); } this.providers = backend.getProviders(); - this.suites = backend.getSuites().createSuites(); + this.suites = createSuites(); installSubstitutions(); }