Mercurial > hg > truffle
changeset 19444:d786fa19dc47
Merge.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Tue, 17 Feb 2015 01:44:13 +0100 |
parents | ac5b08ea9a6a (current diff) 5779b6771043 (diff) |
children | 82c5dfb8435a |
files | |
diffstat | 2 files changed, 13 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.loop/src/com/oracle/graal/loop/LoopTransformations.java Tue Feb 17 01:43:24 2015 +0100 +++ b/graal/com.oracle.graal.loop/src/com/oracle/graal/loop/LoopTransformations.java Tue Feb 17 01:44:13 2015 +0100 @@ -68,6 +68,8 @@ LoopFragmentWhole originalLoop = loop.whole(); StructuredGraph graph = firstNode.graph(); + loop.loopBegin().incrementUnswitches(); + // create new control split out of loop ControlSplitNode newControlSplit = (ControlSplitNode) firstNode.copyWithInputs(); originalLoop.entryPoint().replaceAtPredecessor(newControlSplit);
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/LoopBeginNode.java Tue Feb 17 01:43:24 2015 +0100 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/LoopBeginNode.java Tue Feb 17 01:44:13 2015 +0100 @@ -43,6 +43,8 @@ protected double loopFrequency; protected int nextEndIndex; protected int unswitches; + protected int inversionCount; + @OptionalInput(InputType.Guard) GuardingNode overflowGuard; public LoopBeginNode() { @@ -185,10 +187,18 @@ return unswitches; } - public void incUnswitches() { + public void incrementUnswitches() { unswitches++; } + public int getInversionCount() { + return inversionCount; + } + + public void setInversionCount(int count) { + inversionCount = count; + } + @Override public void simplify(SimplifierTool tool) { removeDeadPhis();