File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -190,7 +190,8 @@ class RegReloadCache {
190
190
// Does basic block MBB contains reload of Reg from FI?
191
191
bool hasReload (Register Reg, int FI, const MachineBasicBlock *MBB) {
192
192
RegSlotPair RSP (Reg, FI);
193
- return Reloads.count (MBB) && Reloads[MBB].count (RSP);
193
+ auto It = Reloads.find (MBB);
194
+ return It != Reloads.end () && It->second .count (RSP);
194
195
}
195
196
};
196
197
@@ -242,9 +243,10 @@ class FrameIndexesCache {
242
243
It.second .Index = 0 ;
243
244
244
245
ReservedSlots.clear ();
245
- if (EHPad && GlobalIndices.count (EHPad))
246
- for (auto &RSP : GlobalIndices[EHPad])
247
- ReservedSlots.insert (RSP.second );
246
+ if (EHPad)
247
+ if (auto It = GlobalIndices.find (EHPad); It != GlobalIndices.end ())
248
+ for (auto &RSP : It->second )
249
+ ReservedSlots.insert (RSP.second );
248
250
}
249
251
250
252
// Get frame index to spill the register.
You can’t perform that action at this time.
0 commit comments