[llvm-commits] [llvm] r62962 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Dan Gohman
gohman at apple.com
Sun Jan 25 08:20:37 PST 2009
Author: djg
Date: Sun Jan 25 10:20:37 2009
New Revision: 62962
URL: http://llvm.org/viewvc/llvm-project?rev=62962&view=rev
Log:
Move the N->use_empty() assert from DeleteNode to
DeleteNodeNotInCSEMaps, since DeleteNode just calls
DeleteNodeNotInCSEMaps.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=62962&r1=62961&r2=62962&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Sun Jan 25 10:20:37 2009
@@ -568,8 +568,6 @@
}
void SelectionDAG::DeleteNode(SDNode *N) {
- assert(N->use_empty() && "Cannot delete a node that is not dead!");
-
// First take this out of the appropriate CSE map.
RemoveNodeFromCSEMaps(N);
@@ -579,7 +577,8 @@
}
void SelectionDAG::DeleteNodeNotInCSEMaps(SDNode *N) {
- assert(N != AllNodes.begin());
+ assert(N != AllNodes.begin() && "Cannot delete the entry node!");
+ assert(N->use_empty() && "Cannot delete a node that is not dead!");
// Drop all of the operands and decrement used node's use counts.
for (SDNode::op_iterator I = N->op_begin(), E = N->op_end(); I != E; ++I)
More information about the llvm-commits
mailing list