aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-03-02 07:14:49 +0000
committerChris Lattner <sabre@nondot.org>2010-03-02 07:14:49 +0000
commitad7c0f5649d9cee42bd54e02b817316dddb8db80 (patch)
treef0ad985f9f00fb0121e70eeb53516e80def1f39d /lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
parentad0310618a87ee72b74b75b1960603169e9f087d (diff)
downloadexternal_llvm-ad7c0f5649d9cee42bd54e02b817316dddb8db80.zip
external_llvm-ad7c0f5649d9cee42bd54e02b817316dddb8db80.tar.gz
external_llvm-ad7c0f5649d9cee42bd54e02b817316dddb8db80.tar.bz2
I was confused about this, it turns out that MorphNodeTo
*does* delete ex-operands that become dead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97559 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index f708ff2..7e1ce42 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -1770,9 +1770,8 @@ MorphNode(SDNode *Node, unsigned TargetOpc, SDVTList VTList,
} else if (Node->getValueType(NTMNumResults-1) == MVT::Other)
OldChainResultNo = NTMNumResults-1;
- // FIXME: If this matches multiple nodes it will just leave them here
- // dead with noone to love them. These dead nodes can block future
- // matches (!).
+ // Call the underlying SelectionDAG routine to do the transmogrification. Note
+ // that this deletes operands of the old node that become dead.
SDNode *Res = CurDAG->MorphNodeTo(Node, ~TargetOpc, VTList, Ops, NumOps);
// MorphNodeTo can operate in two ways: if an existing node with the