comparison graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/TailDuplicationPhase.java @ 18937:ff232ff8d028

Add utility Node#hasNoUsages.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Fri, 23 Jan 2015 11:52:36 +0100
parents f57d86eb036f
children 480bd3b1adcd
comparison
equal deleted inserted replaced
18936:a56574233253 18937:ff232ff8d028
299 FixedWithNextNode anchorDuplicate = (FixedWithNextNode) duplicates.get(anchor); 299 FixedWithNextNode anchorDuplicate = (FixedWithNextNode) duplicates.get(anchor);
300 // move dependencies on the ValueAnchorNode to the previous BeginNode 300 // move dependencies on the ValueAnchorNode to the previous BeginNode
301 BeginNode prevBegin = BeginNode.prevBegin(forwardEnd); 301 BeginNode prevBegin = BeginNode.prevBegin(forwardEnd);
302 anchorDuplicate.replaceAtUsages(InputType.Guard, prevBegin); 302 anchorDuplicate.replaceAtUsages(InputType.Guard, prevBegin);
303 anchorDuplicate.replaceAtUsages(InputType.Anchor, prevBegin); 303 anchorDuplicate.replaceAtUsages(InputType.Anchor, prevBegin);
304 assert anchorDuplicate.usages().isEmpty(); 304 assert anchorDuplicate.hasNoUsages();
305 305
306 FixedNode next = anchorDuplicate.next(); 306 FixedNode next = anchorDuplicate.next();
307 anchorDuplicate.setNext(null); 307 anchorDuplicate.setNext(null);
308 ((FixedWithNextNode) forwardEnd.predecessor()).setNext(next); 308 ((FixedWithNextNode) forwardEnd.predecessor()).setNext(next);
309 anchorDuplicate.safeDelete(); 309 anchorDuplicate.safeDelete();