summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-09-07 05:36:18 +0000
committerChris Lattner <sabre@nondot.org>2005-09-07 05:36:18 +0000
commit3852fd0e49b23da2bb505e8dbbf80755c0b78e49 (patch)
tree75c73864759674dffd10533d2e9e67fe4047e9ad
parent007c6506991c8634ce7c4186ce308d4f58ef80d7 (diff)
downloadbcm5719-llvm-3852fd0e49b23da2bb505e8dbbf80755c0b78e49.tar.gz
bcm5719-llvm-3852fd0e49b23da2bb505e8dbbf80755c0b78e49.zip
Add a new argument to ReplaceAllUsesWith to keep track of nodes deleted by
this method llvm-svn: 23254
-rw-r--r--llvm/include/llvm/CodeGen/SelectionDAG.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/llvm/include/llvm/CodeGen/SelectionDAG.h b/llvm/include/llvm/CodeGen/SelectionDAG.h
index 895204df571..a987f9f5414 100644
--- a/llvm/include/llvm/CodeGen/SelectionDAG.h
+++ b/llvm/include/llvm/CodeGen/SelectionDAG.h
@@ -328,9 +328,16 @@ public:
/// version if 'From' is known to have a single result, use the second
/// if you have two nodes with identical results, use the third otherwise.
///
- void ReplaceAllUsesWith(SDOperand From, SDOperand Op);
- void ReplaceAllUsesWith(SDNode *From, SDNode *To);
- void ReplaceAllUsesWith(SDNode *From, const std::vector<SDOperand> &To);
+ /// These methods all take an optional vector, which (if not null) is
+ /// populated with any nodes that are deleted from the SelectionDAG, due to
+ /// new equivalences that are discovered.
+ ///
+ void ReplaceAllUsesWith(SDOperand From, SDOperand Op,
+ std::vector<SDNode*> *Deleted = 0);
+ void ReplaceAllUsesWith(SDNode *From, SDNode *To,
+ std::vector<SDNode*> *Deleted = 0);
+ void ReplaceAllUsesWith(SDNode *From, const std::vector<SDOperand> &To,
+ std::vector<SDNode*> *Deleted = 0);
/// DeleteNode - Remove the specified node from the system. This node must
@@ -343,6 +350,7 @@ private:
void RemoveNodeFromCSEMaps(SDNode *N);
SDNode *AddNonLeafNodeToCSEMaps(SDNode *N);
void DeleteNodeIfDead(SDNode *N, void *NodeSet);
+ void DeleteNodeNotInCSEMaps(SDNode *N);
/// SimplifySetCC - Try to simplify a setcc built with the specified operands
/// and cc. If unable to simplify it, return a null SDOperand.
OpenPOWER on IntegriCloud