[llvm] [LV] Strip unnecessary make_{pair, optional} (NFC) (PR #141924)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 6 08:42:00 PDT 2025
================
@@ -8491,7 +8486,7 @@ void VPRecipeBuilder::collectScaledReductions(VFRange &Range) {
PartialReductionChain Chain = Pair.first;
if (ExtendIsOnlyUsedByPartialReductions(Chain.ExtendA) &&
ExtendIsOnlyUsedByPartialReductions(Chain.ExtendB))
- ScaledReductionMap.insert(std::make_pair(Chain.Reduction, Pair.second));
+ ScaledReductionMap.emplace_or_assign(Chain.Reduction, Pair.second);
----------------
lukel97 wrote:
Insert won't overwrite the key if it doesn't exist, but I think emplace_or_assign might? Should this be try_emplace instead? Or just insert with {...}
https://github.com/llvm/llvm-project/pull/141924
More information about the llvm-commits
mailing list