comparison graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/NodeIntrinsificationPhase.java @ 18969:14496953435e

Use Node#getUsageCount wherever possible.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Tue, 27 Jan 2015 13:17:53 +0100
parents ff232ff8d028
children 26777392b971
comparison
equal deleted inserted replaced
18968:287f269b6c5a 18969:14496953435e
405 } else if (usage instanceof ReturnNode && ((ValueNode) intrinsifiedNode).stamp() == StampFactory.forNodeIntrinsic()) { 405 } else if (usage instanceof ReturnNode && ((ValueNode) intrinsifiedNode).stamp() == StampFactory.forNodeIntrinsic()) {
406 usage.replaceFirstInput(input, intrinsifiedNode); 406 usage.replaceFirstInput(input, intrinsifiedNode);
407 Debug.log("%s: Checkcast used in a return with forNodeIntrinsic stamp", Debug.contextSnapshot(JavaMethod.class)); 407 Debug.log("%s: Checkcast used in a return with forNodeIntrinsic stamp", Debug.contextSnapshot(JavaMethod.class));
408 } else if (usage instanceof IsNullNode) { 408 } else if (usage instanceof IsNullNode) {
409 if (!usage.hasNoUsages()) { 409 if (!usage.hasNoUsages()) {
410 assert usage.usages().count() == 1 && usage.usages().first().predecessor() == input : usage + " " + input; 410 assert usage.getUsageCount() == 1 && usage.usages().first().predecessor() == input : usage + " " + input;
411 graph.replaceFloating((FloatingNode) usage, LogicConstantNode.contradiction(graph)); 411 graph.replaceFloating((FloatingNode) usage, LogicConstantNode.contradiction(graph));
412 Debug.log("%s: Replaced IsNull with false", Debug.contextSnapshot(JavaMethod.class)); 412 Debug.log("%s: Replaced IsNull with false", Debug.contextSnapshot(JavaMethod.class));
413 } else { 413 } else {
414 // Removed as usage of a GuardingPiNode 414 // Removed as usage of a GuardingPiNode
415 } 415 }