[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAG.h
Chris Lattner
lattner at cs.uiuc.edu
Tue Sep 6 22:36:29 PDT 2005
Changes in directory llvm/include/llvm/CodeGen:
SelectionDAG.h updated: 1.60 -> 1.61
---
Log message:
Add a new argument to ReplaceAllUsesWith to keep track of nodes deleted by
this method
---
Diffs of the changes: (+11 -3)
SelectionDAG.h | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
Index: llvm/include/llvm/CodeGen/SelectionDAG.h
diff -u llvm/include/llvm/CodeGen/SelectionDAG.h:1.60 llvm/include/llvm/CodeGen/SelectionDAG.h:1.61
--- llvm/include/llvm/CodeGen/SelectionDAG.h:1.60 Fri Sep 2 14:35:42 2005
+++ llvm/include/llvm/CodeGen/SelectionDAG.h Wed Sep 7 00:36:18 2005
@@ -328,9 +328,16 @@
/// 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 @@
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.
More information about the llvm-commits
mailing list