[llvm] r269256 - SDAG: Clean up dangling nodes in ARMISelDAGToDAG::SelectImpl
Justin Bogner via llvm-commits
llvm-commits at lists.llvm.org
Wed May 11 17:20:20 PDT 2016
Author: bogner
Date: Wed May 11 19:20:19 2016
New Revision: 269256
URL: http://llvm.org/viewvc/llvm-project?rev=269256&view=rev
Log:
SDAG: Clean up dangling nodes in ARMISelDAGToDAG::SelectImpl
When we convert to the void Select interface, leaving unreferenced
nodes around won't be allowed anymore.
Part of llvm.org/pr26808.
Modified:
llvm/trunk/lib/Target/ARM/ARMISelDAGToDAG.cpp
Modified: llvm/trunk/lib/Target/ARM/ARMISelDAGToDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelDAGToDAG.cpp?rev=269256&r1=269255&r2=269256&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMISelDAGToDAG.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMISelDAGToDAG.cpp Wed May 11 19:20:19 2016
@@ -1941,6 +1941,7 @@ SDNode *ARMDAGToDAGISel::SelectVLD(SDNod
ReplaceUses(SDValue(N, NumVecs), SDValue(VLd, 1));
if (isUpdating)
ReplaceUses(SDValue(N, NumVecs + 1), SDValue(VLd, 2));
+ CurDAG->RemoveDeadNode(N);
return nullptr;
}
@@ -2207,6 +2208,7 @@ SDNode *ARMDAGToDAGISel::SelectVLDSTLane
ReplaceUses(SDValue(N, NumVecs), SDValue(VLdLn, 1));
if (isUpdating)
ReplaceUses(SDValue(N, NumVecs + 1), SDValue(VLdLn, 2));
+ CurDAG->RemoveDeadNode(N);
return nullptr;
}
@@ -2290,6 +2292,7 @@ SDNode *ARMDAGToDAGISel::SelectVLDDup(SD
ReplaceUses(SDValue(N, NumVecs), SDValue(VLdDup, 1));
if (isUpdating)
ReplaceUses(SDValue(N, NumVecs + 1), SDValue(VLdDup, 2));
+ CurDAG->RemoveDeadNode(N);
return nullptr;
}
@@ -2621,6 +2624,7 @@ SDNode *ARMDAGToDAGISel::SelectCMP_SWAP(
ReplaceUses(SDValue(N, 0), SDValue(CmpSwap, 0));
ReplaceUses(SDValue(N, 1), SDValue(CmpSwap, 2));
+ CurDAG->RemoveDeadNode(N);
return nullptr;
}
@@ -2702,7 +2706,7 @@ SDNode *ARMDAGToDAGISel::SelectImpl(SDNo
ResNode=CurDAG->getMachineNode(ARM::LDRcp, dl, MVT::i32, MVT::Other,
Ops);
}
- ReplaceUses(SDValue(N, 0), SDValue(ResNode, 0));
+ ReplaceNode(N, ResNode);
return nullptr;
}
@@ -2939,6 +2943,7 @@ SDNode *ARMDAGToDAGISel::SelectImpl(SDNo
}
ReplaceUses(SDValue(N, 0),
SDValue(Chain.getNode(), Chain.getResNo()));
+ CurDAG->RemoveDeadNode(N);
return nullptr;
}
case ARMISD::VZIP: {
@@ -3281,6 +3286,7 @@ SDNode *ARMDAGToDAGISel::SelectImpl(SDNo
ReplaceUses(SDValue(N, 1), Result);
}
ReplaceUses(SDValue(N, 2), OutChain);
+ CurDAG->RemoveDeadNode(N);
return nullptr;
}
case Intrinsic::arm_stlexd:
More information about the llvm-commits
mailing list