Mercurial > hg > truffle
comparison graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/InliningPhase.java @ 9928:a9311ec68721
Avoid graph caching if immature or no profiling information was used for graph building.
author | Christian Haeubl <haeubl@ssw.jku.at> |
---|---|
date | Fri, 07 Jun 2013 14:36:45 +0200 |
parents | 81b298e0868b |
children | 5a4fbe932ab3 |
comparison
equal
deleted
inserted
replaced
9927:81b298e0868b | 9928:a9311ec68721 |
---|---|
296 } | 296 } |
297 return null; | 297 return null; |
298 } | 298 } |
299 | 299 |
300 private StructuredGraph parseBytecodes(StructuredGraph newGraph, Assumptions assumptions) { | 300 private StructuredGraph parseBytecodes(StructuredGraph newGraph, Assumptions assumptions) { |
301 boolean hasMatureProfilingInfo = newGraph.method().getProfilingInfo().isMature(); | |
302 | |
301 if (plan != null) { | 303 if (plan != null) { |
302 plan.runPhases(PhasePosition.AFTER_PARSING, newGraph); | 304 plan.runPhases(PhasePosition.AFTER_PARSING, newGraph); |
303 } | 305 } |
304 assert newGraph.start().next() != null : "graph needs to be populated during PhasePosition.AFTER_PARSING"; | 306 assert newGraph.start().next() != null : "graph needs to be populated during PhasePosition.AFTER_PARSING"; |
305 | 307 |
311 | 313 |
312 if (CullFrameStates.getValue()) { | 314 if (CullFrameStates.getValue()) { |
313 new CullFrameStatesPhase().apply(newGraph); | 315 new CullFrameStatesPhase().apply(newGraph); |
314 } | 316 } |
315 if (CacheGraphs.getValue() && cache != null) { | 317 if (CacheGraphs.getValue() && cache != null) { |
316 cache.put(newGraph.copy()); | 318 cache.put(newGraph.copy(), hasMatureProfilingInfo); |
317 } | 319 } |
318 return newGraph; | 320 return newGraph; |
319 } | 321 } |
320 | 322 |
321 private static synchronized CompiledMethodInfo compiledMethodInfo(ResolvedJavaMethod m) { | 323 private static synchronized CompiledMethodInfo compiledMethodInfo(ResolvedJavaMethod m) { |