[llvm] 52b4470 - [SelectionDAG] Use SmallVector::assign instead of clear+append. NFC (#173946)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 30 08:44:36 PST 2025
Author: Craig Topper
Date: 2025-12-30T08:44:32-08:00
New Revision: 52b44704545bdf010c42e9cc5bb174402d9e0434
URL: https://github.com/llvm/llvm-project/commit/52b44704545bdf010c42e9cc5bb174402d9e0434
DIFF: https://github.com/llvm/llvm-project/commit/52b44704545bdf010c42e9cc5bb174402d9e0434.diff
LOG: [SelectionDAG] Use SmallVector::assign instead of clear+append. NFC (#173946)
Added:
Modified:
llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index 59375dd2ad349..f95273b4f1016 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -4419,8 +4419,7 @@ void SelectionDAGISel::SelectCodeCommon(SDNode *NodeToMatch,
// formed.
MatchScope &LastScope = MatchScopes.back();
RecordedNodes.resize(LastScope.NumRecordedNodes);
- NodeStack.clear();
- NodeStack.append(LastScope.NodeStack.begin(), LastScope.NodeStack.end());
+ NodeStack.assign(LastScope.NodeStack.begin(), LastScope.NodeStack.end());
N = NodeStack.back();
if (LastScope.NumMatchedMemRefs != MatchedMemRefs.size())
More information about the llvm-commits
mailing list