Mercurial > hg > graal-jvmci-8
changeset 10025:0c717bcb2988
Merge.
author | Christian Haeubl <haeubl@ssw.jku.at> |
---|---|
date | Thu, 13 Jun 2013 14:47:32 +0200 |
parents | b2934877ba61 (diff) 4ebe31e19892 (current diff) |
children | 2beeb916aa31 5260095a574b |
files | |
diffstat | 2 files changed, 11 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/graph/ComputeInliningRelevanceClosure.java Thu Jun 13 11:25:46 2013 +0200 +++ b/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/graph/ComputeInliningRelevanceClosure.java Thu Jun 13 14:47:32 2013 +0200 @@ -55,14 +55,14 @@ public ComputeInliningRelevanceIterator(StructuredGraph graph) { super(graph); - this.scopes = computeLowestPathProbabilities(); + this.scopes = computeScopesAndProbabilities(); } @Override protected void initializeScope() { Scope scope = scopes.get(currentScopeStart); parentRelevance = getParentScopeRelevance(scope); - currentProbability = scope.minPathProbability; + currentProbability = scope.probability; } private double getParentScopeRelevance(Scope scope) { @@ -72,7 +72,7 @@ for (AbstractEndNode end : ((LoopBeginNode) scope.start).forwardEnds()) { parentProbability += nodeProbabilities.get(end); } - return parentProbability / scope.parent.minPathProbability; + return parentProbability / scope.parent.probability; } else { assert scope.parent == null; return 1.0; @@ -89,11 +89,11 @@ assert !Double.isNaN(relevance); } - private HashMap<FixedNode, Scope> computeLowestPathProbabilities() { + private HashMap<FixedNode, Scope> computeScopesAndProbabilities() { HashMap<FixedNode, Scope> result = new HashMap<>(); for (Scope scope : computeScopes()) { - scope.minPathProbability = Math.max(EPSILON, nodeProbabilities.get(scope.start)); + scope.probability = Math.max(EPSILON, nodeProbabilities.get(scope.start)); result.put(scope.start, scope); } @@ -132,7 +132,7 @@ public final FixedNode start; public final Scope parent; - public double minPathProbability; + public double probability; public Scope(FixedNode start, Scope parent) { this.start = start;
--- a/src/share/vm/runtime/compilationPolicy.cpp Thu Jun 13 11:25:46 2013 +0200 +++ b/src/share/vm/runtime/compilationPolicy.cpp Thu Jun 13 14:47:32 2013 +0200 @@ -422,6 +422,11 @@ if (is_compilation_enabled() && can_be_compiled(m)) { nmethod* nm = m->code(); +#ifdef GRAALVM + if (m->queued_for_compilation()) { + delay_compilation(m()); + } else +#endif if (nm == NULL ) { CompileBroker::compile_method(m, InvocationEntryBci, comp_level, m, hot_count, comment, thread); }