# HG changeset patch # User Doug Simon # Date 1358108359 -3600 # Node ID b79ad92d5a26c7be9306f33d8d3ea1e572d3f2b4 # Parent 12bd634440d00364d83f7ff32d0b64668120225d compile the intrinsic graph for a method if the method is scheduled for compilation (in addition to intrinsifiying it when it is called) diff -r 12bd634440d0 -r b79ad92d5a26 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java Sun Jan 13 21:17:13 2013 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java Sun Jan 13 21:19:19 2013 +0100 @@ -22,11 +22,14 @@ */ package com.oracle.graal.hotspot; +import static com.oracle.graal.nodes.StructuredGraph.*; + import java.util.concurrent.*; import com.oracle.graal.api.code.*; import com.oracle.graal.api.meta.*; import com.oracle.graal.debug.*; +import com.oracle.graal.graph.*; import com.oracle.graal.hotspot.meta.*; import com.oracle.graal.nodes.*; import com.oracle.graal.phases.*; @@ -127,7 +130,12 @@ @Override public CompilationResult call() throws Exception { graalRuntime.evictDeoptedGraphs(); - StructuredGraph graph = new StructuredGraph(method, entryBCI); + StructuredGraph graph = (StructuredGraph) method.getCompilerStorage().get(Graph.class); + if (graph == null || entryBCI != INVOCATION_ENTRY_BCI) { + graph = new StructuredGraph(method, entryBCI); + } else { + // Compiling an intrinsic graph + } return graalRuntime.getCompiler().compileMethod(method, graph, graalRuntime.getCache(), plan, optimisticOpts); } });