# HG changeset patch # User Gilles Duboscq # Date 1312798579 -7200 # Node ID ef79e8b2c4374193e09bdcc9a924e932560259b1 # Parent a6210c7daddea76e018046e4d14f4b92501c20f7 Stop trying to be smart and use createAnchor in ConverConditionalPhase diff -r a6210c7dadde -r ef79e8b2c437 graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/phases/ConvertConditionalPhase.java --- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/phases/ConvertConditionalPhase.java Sun Aug 07 18:05:52 2011 +0200 +++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/phases/ConvertConditionalPhase.java Mon Aug 08 12:16:19 2011 +0200 @@ -93,34 +93,7 @@ } schedule.assignBlockToNode(conditional); Block block = schedule.getNodeToBlock().get(conditional); - FixedNodeWithNext prev; - Node firstNode = block.firstNode(); - if (firstNode instanceof Merge) { - prev = (Merge) firstNode; - } else if (firstNode instanceof EndNode) { - EndNode end = (EndNode) firstNode; - Node pred = end.predecessor(); - Anchor anchor = new Anchor(graph); - pred.replaceFirstSuccessor(end, anchor); - anchor.setNext(end); - prev = anchor; - } else if (firstNode instanceof StartNode) { - StartNode start = (StartNode) firstNode; - Anchor anchor = new Anchor(graph); - Node next = start.next(); - start.setNext(null); - anchor.setNext((FixedNode) next); - start.setNext(anchor); - prev = anchor; - } else if (firstNode instanceof If) { - Node pred = firstNode.predecessor(); - Anchor anchor = new Anchor(graph); - pred.replaceFirstSuccessor(firstNode, anchor); - anchor.setNext((If) firstNode); - prev = anchor; - } else { - prev = (FixedNodeWithNext) firstNode; - } + Anchor prev = block.createAnchor(); FixedNode next = prev.next(); prev.setNext(null); merge.setNext(next); diff -r a6210c7dadde -r ef79e8b2c437 graal/com.oracle.max.graal.runtime/src/com/oracle/max/graal/runtime/HotSpotRuntime.java --- a/graal/com.oracle.max.graal.runtime/src/com/oracle/max/graal/runtime/HotSpotRuntime.java Sun Aug 07 18:05:52 2011 +0200 +++ b/graal/com.oracle.max.graal.runtime/src/com/oracle/max/graal/runtime/HotSpotRuntime.java Mon Aug 08 12:16:19 2011 +0200 @@ -514,7 +514,7 @@ graph.setReturn(ret); return graph; } - } else if (holderName.equals("Ljava/lang/Float;")) { //XXX (gd) the non-raw versions of (F/D)2(I/L) should return a sanitized NaN in the NaN case. also check NaN case for (I/L)2(F/D) + } else if (holderName.equals("Ljava/lang/Float;")) { //XXX (gd) the non-raw versions of (F/D)2(I/L) should return a sanitized NaN in the NaN case. if (fullName.equals("floatToRawIntBits(F)I") || fullName.equals("floatToIntBits(F)I")) { CompilerGraph graph = new CompilerGraph(this); Return ret = new Return(new FPConversionNode(CiKind.Int, new Local(CiKind.Float, 0, graph), graph), graph);