Mercurial > hg > truffle
changeset 11577:d85a75b1b214
The lowering of FixedGuardNode is independent of the runtime
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Tue, 10 Sep 2013 09:56:35 +0200 |
parents | e1309fc4d17f |
children | 81ebb0719dc5 |
files | graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotRuntime.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/FixedGuardNode.java |
diffstat | 2 files changed, 4 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotRuntime.java Tue Sep 10 14:32:55 2013 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotRuntime.java Tue Sep 10 09:56:35 2013 +0200 @@ -676,12 +676,6 @@ StoreHubNode storeHub = (StoreHubNode) n; WriteNode hub = createWriteHub(graph, wordKind, storeHub.getObject(), storeHub.getValue()); graph.replaceFixed(storeHub, hub); - } else if (n instanceof FixedGuardNode) { - FixedGuardNode node = (FixedGuardNode) n; - GuardingNode guard = tool.createGuard(node.condition(), node.getReason(), node.getAction(), node.isNegated()); - ValueAnchorNode newAnchor = graph.add(new ValueAnchorNode(guard.asNode())); - node.replaceAtUsages(guard.asNode()); - graph.replaceFixedWithFixed(node, newAnchor); } else if (n instanceof CommitAllocationNode) { if (tool.getLoweringType() == LoweringType.AFTER_GUARDS) { CommitAllocationNode commit = (CommitAllocationNode) n;
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/FixedGuardNode.java Tue Sep 10 14:32:55 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/FixedGuardNode.java Tue Sep 10 09:56:35 2013 +0200 @@ -108,7 +108,10 @@ @Override public void lower(LoweringTool tool, LoweringType loweringType) { if (loweringType == LoweringType.BEFORE_GUARDS) { - tool.getRuntime().lower(this, tool); + GuardingNode guard = tool.createGuard(condition(), getReason(), getAction(), isNegated()); + ValueAnchorNode newAnchor = graph().add(new ValueAnchorNode(guard.asNode())); + this.replaceAtUsages(guard.asNode()); + graph().replaceFixedWithFixed(this, newAnchor); } else { FixedNode next = next(); setNext(null);