aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-08-17 18:59:17 +0000
committerChris Lattner <sabre@nondot.org>2005-08-17 18:59:17 +0000
commit6542d950609208de3e1cde704c5f89aad864c0d9 (patch)
treed42683321e49054daa090b64e3e7802c87ee79b2
parent8c3484c5181834e6b7060a6064ac769878101f23 (diff)
add ReplaceAllUsesWith, and a helper to implemented it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22833 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/CodeGen/SelectionDAG.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/SelectionDAG.h b/include/llvm/CodeGen/SelectionDAG.h
index bebcd1d944..e8f3ff4636 100644
--- a/include/llvm/CodeGen/SelectionDAG.h
+++ b/include/llvm/CodeGen/SelectionDAG.h
@@ -239,10 +239,17 @@ public:
SDOperand Op1, SDOperand Op2, SDOperand Op3) {
return getNode(ISD::BUILTIN_OP_END+Opcode, VT, Op1, Op2, Op3);
}
+
+ /// ReplaceAllUsesWith - Modify anything using 'From' to use 'To' instead.
+ /// This can cause recursive merging of nodes in the DAG.
+ ///
+ void ReplaceAllUsesWith(SDNode *From, SDNode *To);
+
void dump() const;
private:
void RemoveNodeFromCSEMaps(SDNode *N);
+ SDNode *AddNonLeafNodeToCSEMaps(SDNode *N);
void DeleteNodeIfDead(SDNode *N, void *NodeSet);
/// SimplifySetCC - Try to simplify a setcc built with the specified operands