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 f8bd98b commit d3ca484Copy full SHA for d3ca484
llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
@@ -3958,12 +3958,10 @@ class LDVSSAUpdater {
3958
/// For a given MBB, create a wrapper block for it. Stores it in the
3959
/// LDVSSAUpdater block map.
3960
LDVSSABlock *getSSALDVBlock(MachineBasicBlock *BB) {
3961
- auto it = BlockMap.find(BB);
3962
- if (it == BlockMap.end()) {
3963
- BlockMap[BB] = new LDVSSABlock(*BB, *this);
3964
- it = BlockMap.find(BB);
3965
- }
3966
- return it->second;
+ auto [It, Inserted] = BlockMap.try_emplace(BB);
+ if (Inserted)
+ It->second = new LDVSSABlock(*BB, *this);
+ return It->second;
3967
}
3968
3969
/// Find the live-in value number for the given block. Looks up the value at
0 commit comments