We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5c6db8c commit d1cba23Copy full SHA for d1cba23
llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
@@ -4179,13 +4179,14 @@ Instruction *InstCombinerImpl::visitCallBase(CallBase &Call) {
4179
DenseMap<Value *, unsigned> Val2Idx;
4180
std::vector<Value *> NewLiveGc;
4181
for (Value *V : Bundle->Inputs) {
4182
- if (Val2Idx.count(V))
+ auto [It, Inserted] = Val2Idx.try_emplace(V);
4183
+ if (!Inserted)
4184
continue;
4185
if (LiveGcValues.count(V)) {
- Val2Idx[V] = NewLiveGc.size();
4186
+ It->second = NewLiveGc.size();
4187
NewLiveGc.push_back(V);
4188
} else
- Val2Idx[V] = NumOfGCLives;
4189
+ It->second = NumOfGCLives;
4190
}
4191
// Update all gc.relocates
4192
for (const GCRelocateInst *Reloc : GCSP.getGCRelocates()) {
0 commit comments