aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp')
-rw-r--r--llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp b/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
index dbc7246..8d91e71 100644
--- a/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
+++ b/llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
@@ -600,12 +600,12 @@ class MemLocFragmentFill {
break;
}
- auto CurrentLiveInEntry = LiveIn.find(&BB);
// If there's no LiveIn entry for the block yet, add it.
- if (CurrentLiveInEntry == LiveIn.end()) {
+ auto [CurrentLiveInEntry, Inserted] = LiveIn.try_emplace(&BB);
+ if (Inserted) {
LLVM_DEBUG(dbgs() << "change=true (first) on meet on " << BB.getName()
<< "\n");
- LiveIn[&BB] = std::move(BBLiveIn);
+ CurrentLiveInEntry->second = std::move(BBLiveIn);
return /*Changed=*/true;
}