Mercurial > hg > graal-compiler
changeset 6565:f7e2f6d913a4
Merge.
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Sat, 20 Oct 2012 11:53:12 +0200 |
parents | 6f0f686236c2 (diff) 30fa86b78648 (current diff) |
children | ef48be91f5fd |
files | |
diffstat | 7 files changed, 28 insertions(+), 28 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/LIRGenerator.java Fri Oct 19 13:25:19 2012 +0200 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/LIRGenerator.java Sat Oct 20 11:53:12 2012 +0200 @@ -559,7 +559,7 @@ @Override public void emitIf(IfNode x) { - emitBranch(x.compare(), getLIRBlock(x.trueSuccessor()), getLIRBlock(x.falseSuccessor()), null); + emitBranch(x.condition(), getLIRBlock(x.trueSuccessor()), getLIRBlock(x.falseSuccessor()), null); } @Override
--- a/graal/com.oracle.graal.loop/src/com/oracle/graal/loop/LoopTransformations.java Fri Oct 19 13:25:19 2012 +0200 +++ b/graal/com.oracle.graal.loop/src/com/oracle/graal/loop/LoopTransformations.java Sat Oct 20 11:53:12 2012 +0200 @@ -101,11 +101,11 @@ BeginNode tempBegin = graph.add(new BeginNode()); originalLoop.entryPoint().replaceAtPredecessor(tempBegin); double takenProbability = ifNode.probability(ifNode.blockSuccessorIndex(ifNode.trueSuccessor())); - IfNode newIf = graph.add(new IfNode(ifNode.compare(), duplicateLoop.entryPoint(), originalLoop.entryPoint(), takenProbability, ifNode.leafGraphId())); + IfNode newIf = graph.add(new IfNode(ifNode.condition(), duplicateLoop.entryPoint(), originalLoop.entryPoint(), takenProbability, ifNode.leafGraphId())); tempBegin.setNext(newIf); - ifNode.setCompare(graph.unique(ConstantNode.forBoolean(false, graph))); + ifNode.setCondition(graph.unique(ConstantNode.forBoolean(false, graph))); IfNode duplicateIf = duplicateLoop.getDuplicatedNode(ifNode); - duplicateIf.setCompare(graph.unique(ConstantNode.forBoolean(true, graph))); + duplicateIf.setCondition(graph.unique(ConstantNode.forBoolean(true, graph))); ifNode.simplify(simplifier); duplicateIf.simplify(simplifier); // TODO (gd) probabilities need some amount of fixup.. (probably also in other transforms) @@ -134,7 +134,7 @@ public static IfNode findUnswitchableIf(LoopEx loop) { for (IfNode ifNode : loop.whole().nodes().filter(IfNode.class)) { - if (loop.isOutsideLoop(ifNode.compare())) { + if (loop.isOutsideLoop(ifNode.condition())) { return ifNode; } }
--- a/graal/com.oracle.graal.loop/src/com/oracle/graal/loop/LoopsData.java Fri Oct 19 13:25:19 2012 +0200 +++ b/graal/com.oracle.graal.loop/src/com/oracle/graal/loop/LoopsData.java Sat Oct 20 11:53:12 2012 +0200 @@ -99,7 +99,7 @@ } negated = true; } - BooleanNode ifTest = ifNode.compare(); + BooleanNode ifTest = ifNode.condition(); if (!(ifTest instanceof IntegerLessThanNode)) { if (ifTest instanceof IntegerBelowThanNode) { Debug.log("Ignored potential Counted loop at %s with |<|", loopBegin);
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/IfNode.java Fri Oct 19 13:25:19 2012 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/IfNode.java Sat Oct 20 11:53:12 2012 +0200 @@ -37,20 +37,20 @@ public static final int FALSE_EDGE = 1; private final long leafGraphId; - @Input private BooleanNode compare; + @Input private BooleanNode condition; - public BooleanNode compare() { - return compare; + public BooleanNode condition() { + return condition; } - public void setCompare(BooleanNode x) { - updateUsages(compare, x); - compare = x; + public void setCondition(BooleanNode x) { + updateUsages(condition, x); + condition = x; } public IfNode(BooleanNode condition, FixedNode trueSuccessor, FixedNode falseSuccessor, double takenProbability, long leafGraphId) { super(StampFactory.forVoid(), new BeginNode[] {BeginNode.begin(trueSuccessor), BeginNode.begin(falseSuccessor)}, new double[] {takenProbability, 1 - takenProbability}); - this.compare = condition; + this.condition = condition; this.leafGraphId = leafGraphId; } @@ -101,7 +101,7 @@ @Override public boolean verify() { - assertTrue(compare() != null, "missing compare"); + assertTrue(condition() != null, "missing condition"); assertTrue(trueSuccessor() != null, "missing trueSuccessor"); assertTrue(falseSuccessor() != null, "missing falseSuccessor"); return super.verify(); @@ -109,8 +109,8 @@ @Override public void simplify(SimplifierTool tool) { - if (compare() instanceof ConstantNode) { - ConstantNode c = (ConstantNode) compare(); + if (condition() instanceof ConstantNode) { + ConstantNode c = (ConstantNode) condition(); if (c.asConstant().asBoolean()) { tool.deleteBranch(falseSuccessor()); tool.addToWorkList(trueSuccessor()); @@ -145,7 +145,7 @@ return; } if (trueValue.isConstant() && falseValue.isConstant()) { - MaterializeNode materialize = MaterializeNode.create(compare(), trueValue, falseValue); + MaterializeNode materialize = MaterializeNode.create(condition(), trueValue, falseValue); ((StructuredGraph) graph()).replaceFloating(singlePhi, materialize); removeEmptyIf(tool); return;
--- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/CheckCastEliminationPhase.java Fri Oct 19 13:25:19 2012 +0200 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/CheckCastEliminationPhase.java Sat Oct 20 11:53:12 2012 +0200 @@ -264,24 +264,24 @@ Node pred = node.predecessor(); if (pred != null && pred instanceof IfNode) { IfNode ifNode = (IfNode) pred; - if (!(ifNode.compare() instanceof ConstantNode)) { + if (!(ifNode.condition() instanceof ConstantNode)) { boolean isTrue = (node == ifNode.trueSuccessor()); if (isTrue) { - state.trueConditions.put(ifNode.compare(), begin); + state.trueConditions.put(ifNode.condition(), begin); } else { - state.falseConditions.put(ifNode.compare(), begin); + state.falseConditions.put(ifNode.condition(), begin); } } - if (ifNode.compare() instanceof InstanceOfNode) { - InstanceOfNode instanceOf = (InstanceOfNode) ifNode.compare(); + if (ifNode.condition() instanceof InstanceOfNode) { + InstanceOfNode instanceOf = (InstanceOfNode) ifNode.condition(); if ((node == ifNode.trueSuccessor())) { ValueNode object = instanceOf.object(); state.knownNotNull.add(object); state.knownTypes.put(object, tighten(instanceOf.targetClass(), state.getNodeType(object))); metricInstanceOfRegistered.increment(); } - } else if (ifNode.compare() instanceof IsNullNode) { - IsNullNode nullCheck = (IsNullNode) ifNode.compare(); + } else if (ifNode.condition() instanceof IsNullNode) { + IsNullNode nullCheck = (IsNullNode) ifNode.condition(); boolean isNull = (node == ifNode.trueSuccessor()); if (isNull) { state.knownNull.add(nullCheck.object()); @@ -337,7 +337,7 @@ } else if (node instanceof IfNode) { IfNode ifNode = (IfNode) node; BooleanNode replaceWith = null; - BooleanNode compare = ifNode.compare(); + BooleanNode compare = ifNode.condition(); if (state.trueConditions.containsKey(compare)) { replaceWith = ConstantNode.forBoolean(true, graph); @@ -372,7 +372,7 @@ } } if (replaceWith != null) { - ifNode.setCompare(replaceWith); + ifNode.setCondition(replaceWith); if (compare.usages().isEmpty()) { GraphUtil.killWithUnusedFloatingInputs(compare); }
--- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/ConvertDeoptimizeToGuardPhase.java Fri Oct 19 13:25:19 2012 +0200 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/ConvertDeoptimizeToGuardPhase.java Sat Oct 20 11:53:12 2012 +0200 @@ -79,7 +79,7 @@ } else if (deoptBegin.predecessor() instanceof IfNode) { IfNode ifNode = (IfNode) deoptBegin.predecessor(); BeginNode otherBegin = ifNode.trueSuccessor(); - BooleanNode conditionNode = ifNode.compare(); + BooleanNode conditionNode = ifNode.condition(); if (conditionNode instanceof InstanceOfNode) { // TODO The lowering currently does not support a FixedGuard as the usage of an InstanceOfNode. Relax this restriction. return;
--- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/ConvertUnreachedToGuardPhase.java Fri Oct 19 13:25:19 2012 +0200 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/ConvertUnreachedToGuardPhase.java Sat Oct 20 11:53:12 2012 +0200 @@ -58,7 +58,7 @@ delete = ifNode.falseSuccessor(); } if (insertGuard != null) { - GuardNode guard = graph.unique(new GuardNode(ifNode.compare(), BeginNode.prevBegin(ifNode), DeoptimizationReason.UnreachedCode, DeoptimizationAction.InvalidateReprofile, inverted, ifNode.leafGraphId())); + GuardNode guard = graph.unique(new GuardNode(ifNode.condition(), BeginNode.prevBegin(ifNode), DeoptimizationReason.UnreachedCode, DeoptimizationAction.InvalidateReprofile, inverted, ifNode.leafGraphId())); graph.addBeforeFixed(ifNode, graph.add(new ValueAnchorNode(guard))); GraphUtil.killCFG(delete); graph.removeSplit(ifNode, inverted ? IfNode.FALSE_EDGE : IfNode.TRUE_EDGE);