Add RemoveDeadNode to remove a dead node and its (potentially) dead operands.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30916 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng
2006-10-12 20:34:05 +00:00
parent 3657ffe037
commit 130a6471b9
2 changed files with 42 additions and 4 deletions

View File

@@ -129,7 +129,16 @@ public:
/// RemoveDeadNodes - This method deletes all unreachable nodes in the
/// SelectionDAG.
void RemoveDeadNodes();
/// RemoveDeadNode - Remove the specified node from the system. If any of its
/// operands then becomes dead, remove them as well. The vector Deleted is
/// populated with nodes that are deleted.
void RemoveDeadNode(SDNode *N, std::vector<SDNode*> &Deleted);
/// DeleteNode - Remove the specified node from the system. This node must
/// have no referrers.
void DeleteNode(SDNode *N);
/// getVTList - Return an SDVTList that represents the list of values
/// specified.
SDVTList getVTList(MVT::ValueType VT);
@@ -407,10 +416,6 @@ public:
void ReplaceAllUsesOfValueWith(SDOperand From, SDOperand To,
std::vector<SDNode*> &Deleted);
/// DeleteNode - Remove the specified node from the system. This node must
/// have no referrers.
void DeleteNode(SDNode *N);
/// AssignNodeIds - Assign a unique node id for each node in the DAG based on
/// their allnodes order. It returns the maximum id.
unsigned AssignNodeIds();