Mercurial > hg > truffle
comparison graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java @ 19232:66c60942c06c
GraalCompiler.emitLowLevel: use LowLevelSuites instead of LowLevelCompilerConfiguration.
author | Josef Eisl <josef.eisl@jku.at> |
---|---|
date | Tue, 10 Feb 2015 11:09:28 +0100 |
parents | 75da87c96605 |
children | 8ab925a6f724 292442bed972 |
comparison
equal
deleted
inserted
replaced
19231:df89224ee04a | 19232:66c60942c06c |
---|---|
53 import com.oracle.graal.hotspot.events.EventProvider.CompilerFailureEvent; | 53 import com.oracle.graal.hotspot.events.EventProvider.CompilerFailureEvent; |
54 import com.oracle.graal.hotspot.meta.*; | 54 import com.oracle.graal.hotspot.meta.*; |
55 import com.oracle.graal.hotspot.phases.*; | 55 import com.oracle.graal.hotspot.phases.*; |
56 import com.oracle.graal.java.*; | 56 import com.oracle.graal.java.*; |
57 import com.oracle.graal.lir.asm.*; | 57 import com.oracle.graal.lir.asm.*; |
58 import com.oracle.graal.lir.phases.*; | |
58 import com.oracle.graal.nodes.*; | 59 import com.oracle.graal.nodes.*; |
59 import com.oracle.graal.nodes.spi.*; | 60 import com.oracle.graal.nodes.spi.*; |
60 import com.oracle.graal.phases.*; | 61 import com.oracle.graal.phases.*; |
61 import com.oracle.graal.phases.OptimisticOptimizations.Optimization; | 62 import com.oracle.graal.phases.OptimisticOptimizations.Optimization; |
62 import com.oracle.graal.phases.tiers.*; | 63 import com.oracle.graal.phases.tiers.*; |
134 | 135 |
135 public static final DebugTimer CodeInstallationTime = Debug.timer("CodeInstallation"); | 136 public static final DebugTimer CodeInstallationTime = Debug.timer("CodeInstallation"); |
136 | 137 |
137 protected Suites getSuites(HotSpotProviders providers) { | 138 protected Suites getSuites(HotSpotProviders providers) { |
138 return providers.getSuites().getDefaultSuites(); | 139 return providers.getSuites().getDefaultSuites(); |
140 } | |
141 | |
142 protected LowLevelSuites getLowLevelSuites(HotSpotProviders providers) { | |
143 return providers.getSuites().getDefaultLowLevelSuites(); | |
139 } | 144 } |
140 | 145 |
141 protected PhaseSuite<HighTierContext> getGraphBuilderSuite(HotSpotProviders providers) { | 146 protected PhaseSuite<HighTierContext> getGraphBuilderSuite(HotSpotProviders providers) { |
142 PhaseSuite<HighTierContext> suite = withSimpleDebugInfoIfRequested(providers.getSuites().getDefaultGraphBuilderSuite()); | 147 PhaseSuite<HighTierContext> suite = withSimpleDebugInfoIfRequested(providers.getSuites().getDefaultGraphBuilderSuite()); |
143 | 148 |
221 CallingConvention tmp = providers.getCodeCache().getRegisterConfig().getCallingConvention(JavaCallee, providers.getMetaAccess().lookupJavaType(void.class), parameterTypes, | 226 CallingConvention tmp = providers.getCodeCache().getRegisterConfig().getCallingConvention(JavaCallee, providers.getMetaAccess().lookupJavaType(void.class), parameterTypes, |
222 backend.getTarget(), false); | 227 backend.getTarget(), false); |
223 cc = new CallingConvention(cc.getStackSize(), cc.getReturn(), tmp.getArgument(0)); | 228 cc = new CallingConvention(cc.getStackSize(), cc.getReturn(), tmp.getArgument(0)); |
224 } | 229 } |
225 Suites suites = getSuites(providers); | 230 Suites suites = getSuites(providers); |
231 LowLevelSuites lowLevelSuites = getLowLevelSuites(providers); | |
226 ProfilingInfo profilingInfo = getProfilingInfo(); | 232 ProfilingInfo profilingInfo = getProfilingInfo(); |
227 OptimisticOptimizations optimisticOpts = getOptimisticOpts(profilingInfo); | 233 OptimisticOptimizations optimisticOpts = getOptimisticOpts(profilingInfo); |
228 if (isOSR) { | 234 if (isOSR) { |
229 // In OSR compiles, we cannot rely on never executed code profiles, because | 235 // In OSR compiles, we cannot rely on never executed code profiles, because |
230 // all code after the OSR loop is never executed. | 236 // all code after the OSR loop is never executed. |
231 optimisticOpts.remove(Optimization.RemoveNeverExecutedCode); | 237 optimisticOpts.remove(Optimization.RemoveNeverExecutedCode); |
232 } | 238 } |
233 result = compileGraph(graph, cc, method, providers, backend, backend.getTarget(), graphCache, getGraphBuilderSuite(providers), optimisticOpts, profilingInfo, | 239 result = compileGraph(graph, cc, method, providers, backend, backend.getTarget(), graphCache, getGraphBuilderSuite(providers), optimisticOpts, profilingInfo, |
234 method.getSpeculationLog(), suites, new CompilationResult(), CompilationResultBuilderFactory.Default); | 240 method.getSpeculationLog(), suites, lowLevelSuites, new CompilationResult(), CompilationResultBuilderFactory.Default); |
235 } | 241 } |
236 result.setId(getId()); | 242 result.setId(getId()); |
237 result.setEntryBCI(entryBCI); | 243 result.setEntryBCI(entryBCI); |
238 } catch (Throwable e) { | 244 } catch (Throwable e) { |
239 throw Debug.handle(e); | 245 throw Debug.handle(e); |