[llvm] [ARM] Simplify code with std::map::operator[] (NFC) (PR #112159)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 13 21:06:22 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-arm
Author: Kazu Hirata (kazutakahirata)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/112159.diff
1 Files Affected:
- (modified) llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp (+2-4)
``````````diff
diff --git a/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp b/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
index 0921e364498186..51a5f895f341db 100644
--- a/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
+++ b/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
@@ -6868,15 +6868,13 @@ bool ARMPipelinerLoopInfo::tooMuchRegisterPressure(SwingSchedulerDAG &SSD,
if (MI->isPHI() && S.getKind() == SDep::Anti) {
Register Reg = S.getReg();
if (Reg.isVirtual())
- CrossIterationNeeds.insert(std::make_pair(Reg.id(), IterNeed()))
- .first->second.set(0);
+ CrossIterationNeeds[Reg.id()].set(0);
} else if (S.isAssignedRegDep()) {
int OStg = SMS.stageScheduled(S.getSUnit());
if (OStg >= 0 && OStg != Stg) {
Register Reg = S.getReg();
if (Reg.isVirtual())
- CrossIterationNeeds.insert(std::make_pair(Reg.id(), IterNeed()))
- .first->second |= ((1 << (OStg - Stg)) - 1);
+ CrossIterationNeeds[Reg.id()] |= ((1 << (OStg - Stg)) - 1);
}
}
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/112159
More information about the llvm-commits
mailing list