diff options
author | Chris Lattner <sabre@nondot.org> | 2010-03-02 07:14:49 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-03-02 07:14:49 +0000 |
commit | 350bb062b275d84ef22c97ae7e97d87602a5a5d6 (patch) | |
tree | 2676ee7bf589dfce6ede8ee59d9becf3258a73a3 /llvm/lib/CodeGen | |
parent | 9732ab6d861d20a1cc739ea875337edb37d88e37 (diff) | |
download | bcm5719-llvm-350bb062b275d84ef22c97ae7e97d87602a5a5d6.tar.gz bcm5719-llvm-350bb062b275d84ef22c97ae7e97d87602a5a5d6.zip |
I was confused about this, it turns out that MorphNodeTo
*does* delete ex-operands that become dead.
llvm-svn: 97559
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index f708ff25832..7e1ce429ef7 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/llvm/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 |