changeset 22245:bdfbff780167

Truffle: collect failed speculations before handing over to Graal
author Andreas Woess <andreas.woess@oracle.com>
date Mon, 20 Jul 2015 04:21:24 +0200
parents 92e1be818769
children 73366ceb98a8
files graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleCompiler.java
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleCompiler.java	Mon Jul 20 03:12:06 2015 +0200
+++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleCompiler.java	Mon Jul 20 04:21:24 2015 +0200
@@ -156,6 +156,11 @@
 
         CompilationResult result = null;
         try (DebugCloseable a = CompilationTime.start(); Scope s = Debug.scope("TruffleGraal.GraalCompiler", graph, providers.getCodeCache()); DebugCloseable c = CompilationMemUse.start()) {
+            SpeculationLog speculationLog = graph.getSpeculationLog();
+            if (speculationLog != null) {
+                speculationLog.collectFailedSpeculations();
+            }
+
             CodeCacheProvider codeCache = providers.getCodeCache();
             CallingConvention cc = getCallingConvention(codeCache, Type.JavaCallee, graph.method(), false);
             CompilationResult compilationResult = new CompilationResult(name);