Skip to content

Commit

Permalink
[ARM] Simplify code with std::map::operator[] (NFC) (llvm#112159)
Browse files Browse the repository at this point in the history
  • Loading branch information
kazutakahirata authored and DanielCChen committed Oct 16, 2024
1 parent 58b08bf commit c4a9197
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
Expand Down

0 comments on commit c4a9197

Please sign in to comment.