[PATCH] D130441: RegAlloc: Use SmallSet instead of std::set
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 24 06:45:12 PDT 2022
arsenm created this revision.
arsenm added reviewers: qcolombet, MatzeB.
Herald added a subscriber: hiraditya.
Herald added a project: All.
arsenm requested review of this revision.
Herald added a subscriber: wdng.
Herald added a project: LLVM.
There shouldn't be more than a small handful of hints at most.
https://reviews.llvm.org/D130441
Files:
llvm/lib/CodeGen/CalcSpillWeights.cpp
Index: llvm/lib/CodeGen/CalcSpillWeights.cpp
===================================================================
--- llvm/lib/CodeGen/CalcSpillWeights.cpp
+++ llvm/lib/CodeGen/CalcSpillWeights.cpp
@@ -278,7 +278,7 @@
if (TargetHint.first == 0 && TargetHint.second)
MRI.clearSimpleHint(LI.reg());
- std::set<Register> HintedRegs;
+ SmallSet<Register, 4> HintedRegs;
for (const auto &Hint : CopyHints) {
if (!HintedRegs.insert(Hint.Reg).second ||
(TargetHint.first != 0 && Hint.Reg == TargetHint.second))
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130441.447131.patch
Type: text/x-patch
Size: 546 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220724/7e1f76d3/attachment.bin>
More information about the llvm-commits
mailing list