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 {
190190 // Does basic block MBB contains reload of Reg from FI?
191191 bool hasReload (Register Reg, int FI, const MachineBasicBlock *MBB) {
192192 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);
194195 }
195196};
196197
@@ -242,9 +243,10 @@ class FrameIndexesCache {
242243 It.second .Index = 0 ;
243244
244245 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 );
248250 }
249251
250252 // Get frame index to spill the register.
You can’t perform that action at this time.
0 commit comments