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 64749fb commit 7fa1936Copy full SHA for 7fa1936
llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
@@ -4206,13 +4206,14 @@ Instruction *InstCombinerImpl::visitCallBase(CallBase &Call) {
4206
DenseMap<Value *, unsigned> Val2Idx;
4207
std::vector<Value *> NewLiveGc;
4208
for (Value *V : Bundle->Inputs) {
4209
- if (Val2Idx.count(V))
+ auto [It, Inserted] = Val2Idx.try_emplace(V);
4210
+ if (!Inserted)
4211
continue;
4212
if (LiveGcValues.count(V)) {
- Val2Idx[V] = NewLiveGc.size();
4213
+ It->second = NewLiveGc.size();
4214
NewLiveGc.push_back(V);
4215
} else
- Val2Idx[V] = NumOfGCLives;
4216
+ It->second = NumOfGCLives;
4217
}
4218
// Update all gc.relocates
4219
for (const GCRelocateInst *Reloc : GCSP.getGCRelocates()) {
0 commit comments