[llvm] [DSE] Simplify code with MapVector::operator[] (NFC) (PR #111621)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 8 19:22:46 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-transforms
Author: Kazu Hirata (kazutakahirata)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/111621.diff
1 Files Affected:
- (modified) llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp (+1-4)
``````````diff
diff --git a/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp b/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
index ce8c988ba531dd..6fce46a624c9c7 100644
--- a/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
+++ b/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
@@ -2259,10 +2259,7 @@ DSEState::eliminateDeadDefs(const MemoryLocationWrapper &KillingLocWrapper) {
KillingLocWrapper.MemLoc, DeadLocWrapper.MemLoc,
KillingOffset, DeadOffset);
if (OR == OW_MaybePartial) {
- auto Iter =
- IOLs.insert(std::make_pair<BasicBlock *, InstOverlapIntervalsTy>(
- DeadLocWrapper.DefInst->getParent(), InstOverlapIntervalsTy()));
- auto &IOL = Iter.first->second;
+ auto &IOL = IOLs[DeadLocWrapper.DefInst->getParent()];
OR = isPartialOverwrite(KillingLocWrapper.MemLoc, DeadLocWrapper.MemLoc,
KillingOffset, DeadOffset,
DeadLocWrapper.DefInst, IOL);
``````````
</details>
https://github.com/llvm/llvm-project/pull/111621
More information about the llvm-commits
mailing list