# HG changeset patch # User Doug Simon # Date 1431690306 -7200 # Node ID 33d3be2548d6a19eab6cc227a72ee233f9b070ef # Parent 307a1ee8f714ec63bc2973a48579632237df3802 removed cache for intermediate graphs in ReplacementsImpl since graph building inlining is now used diff -r 307a1ee8f714 -r 33d3be2548d6 graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/ReplacementsImpl.java --- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/ReplacementsImpl.java Fri May 15 11:55:52 2015 +0200 +++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/ReplacementsImpl.java Fri May 15 13:45:06 2015 +0200 @@ -462,11 +462,6 @@ } /** - * Cache to speed up preprocessing of replacement graphs. - */ - final ConcurrentMap graphCache = new ConcurrentHashMap<>(); - - /** * Creates and preprocesses a graph for a replacement. */ public static class GraphMaker { @@ -493,12 +488,8 @@ public StructuredGraph makeGraph(Object[] args) { try (Scope s = Debug.scope("BuildSnippetGraph", method)) { - StructuredGraph graph = parseGraph(method, args); - - if (args == null) { - // Cannot have a finalized version of a graph in the cache - graph = graph.copy(); - } + assert method.hasBytecodes() : method; + StructuredGraph graph = buildInitialGraph(method, args); finalizeGraph(graph); @@ -551,21 +542,6 @@ return false; } - private StructuredGraph parseGraph(final ResolvedJavaMethod methodToParse, Object[] args) { - assert methodToParse.hasBytecodes() : methodToParse; - if (args != null) { - return buildInitialGraph(methodToParse, args); - } - StructuredGraph graph = replacements.graphCache.get(methodToParse); - if (graph == null) { - StructuredGraph newGraph = buildInitialGraph(methodToParse, args); - replacements.graphCache.putIfAbsent(methodToParse, newGraph); - graph = replacements.graphCache.get(methodToParse); - assert graph != null; - } - return graph; - } - /** * Builds the initial graph for a snippet. */