Mercurial > hg > graal-compiler
changeset 23332:8d31c062a05c
Merge
author | Christian Wimmer <christian.wimmer@oracle.com> |
---|---|
date | Tue, 19 Jan 2016 17:51:48 -0800 |
parents | 141aba8eb39a (current diff) 15964d565d42 (diff) |
children | 5fd40a045778 |
files | |
diffstat | 4 files changed, 28 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java Tue Jan 19 17:51:28 2016 -0800 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java Tue Jan 19 17:51:48 2016 -0800 @@ -233,9 +233,10 @@ handleException(t); /* * Treat random exceptions from the compiler as indicating a problem compiling this - * method. + * method. Report the result of toString instead of getMessage to ensure that the + * exception type is included in the output in case there's no detail mesage. */ - return CompilationRequestResult.failure(t.getMessage(), false); + return CompilationRequestResult.failure(t.toString(), false); } finally { try { int compiledBytecodes = 0;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/GraphDecoder.java Tue Jan 19 17:51:28 2016 -0800 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/GraphDecoder.java Tue Jan 19 17:51:48 2016 -0800 @@ -1294,26 +1294,20 @@ * not insert a LoopExit in such cases, we also do not have to insert a LoopExit. */ if (next instanceof EndNode) { - AbstractMergeNode merge = ((EndNode) next).merge(); - if (methodScope.loopExplosionMerges.contains(merge)) { - /* - * If this guarantee fails, we need to handle phi functions of the merge, - * i.e., take the phi function input for our EndNode and put it into the - * LoopExit state. - */ - JVMCIError.guarantee(merge.cfgPredecessors().count() == 1, merge.toString()); - + EndNode loopExplosionEnd = (EndNode) next; + AbstractMergeNode loopExplosionMerge = loopExplosionEnd.merge(); + if (methodScope.loopExplosionMerges.contains(loopExplosionMerge)) { LoopExitNode loopExit = methodScope.graph.add(new LoopExitNode(loopBegin)); next.replaceAtPredecessor(loopExit); loopExit.setNext(next); - assignLoopExitState(methodScope, loopExit, merge); + assignLoopExitState(methodScope, loopExit, loopExplosionMerge, loopExplosionEnd); } } } } } - private static void assignLoopExitState(MethodScope methodScope, LoopExitNode loopExit, AbstractMergeNode loopExplosionMerge) { + private static void assignLoopExitState(MethodScope methodScope, LoopExitNode loopExit, AbstractMergeNode loopExplosionMerge, AbstractEndNode loopExplosionEnd) { FrameState oldState = loopExplosionMerge.stateAfter(); JVMCIError.guarantee(loopExit.loopBegin().stateAfter().outerFrameState() == oldState.outerFrameState(), "LoopBegin and LoopExit must have the same outer frame state"); @@ -1326,9 +1320,20 @@ } List<ValueNode> newValues = new ArrayList<>(oldState.values().size()); - for (ValueNode value : oldState.values()) { + for (ValueNode v : oldState.values()) { + ValueNode value = v; ValueNode realValue = ProxyPlaceholder.unwrap(value); + /* + * The LoopExit is inserted before the existing merge, i.e., separately for every branch + * that leads to the merge. So for phi functions of the merge, we need to take the input + * that corresponds to our branch. + */ + if (realValue instanceof PhiNode && loopExplosionMerge.isPhiAtMerge(realValue)) { + value = ((PhiNode) realValue).valueAt(loopExplosionEnd); + realValue = ProxyPlaceholder.unwrap(value); + } + if (realValue == null || realValue.isConstant() || loopBeginValues.contains(realValue)) { newValues.add(realValue); } else {
--- a/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/tiers/SuitesProvider.java Tue Jan 19 17:51:28 2016 -0800 +++ b/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/tiers/SuitesProvider.java Tue Jan 19 17:51:48 2016 -0800 @@ -32,9 +32,9 @@ public interface SuitesProvider { /** - * Get the default phase suites of this compiler. This will take in account any options which - * enabled at the time of call, returning an appropriately constructed suite. The returned suite - * is immutable by default but {@link Suites#copy} can be used to create a customized version. + * Get the default phase suites of this compiler. This will take in account any options enabled + * at the time of call, returning an appropriately constructed suite. The returned suite is + * immutable by default but {@link Suites#copy} can be used to create a customized version. */ Suites getDefaultSuites(); @@ -45,9 +45,9 @@ /** * Get the default LIR phase suites of this compiler. This will take in account any options - * enabled active at the time of call, returning an appropriately constructed suite. The - * returned suite is immutable by default but {@link LIRSuites#copy} can be used to create a - * customized version. + * enabled at the time of call, returning an appropriately constructed suite. The returned suite + * is immutable by default but {@link LIRSuites#copy} can be used to create a customized + * version. */ LIRSuites getDefaultLIRSuites(); }
--- a/mx.graal/suite.py Tue Jan 19 17:51:28 2016 -0800 +++ b/mx.graal/suite.py Tue Jan 19 17:51:48 2016 -0800 @@ -47,9 +47,9 @@ }, { "name" : "truffle", - "version" : "bfa145c84dde2191d7057a6fe654de2d74f83fae", + "version" : "175622430e80253e9cc7c17ddbf09cc00adc0bc4", "urls" : [ - {"url" : "http://lafo.ssw.uni-linz.ac.at/hg/truffle", "kind" : "hg"}, + {"url" : "https://github.com/graalvm/truffle.git", "kind" : "git"}, {"url" : "https://curio.ssw.jku.at/nexus/content/repositories/snapshots", "kind" : "binary"}, ] },