File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -180,14 +180,15 @@ bool HexagonCopyHoisting::analyzeCopy(MachineBasicBlock *BB) {
180180 bool IsSafetoMove = true ;
181181 for (MachineBasicBlock *SuccBB : BB->successors ()) {
182182 auto &SuccBBCopyInst = CopyMIList[SuccBB->getNumber ()];
183- if (!SuccBBCopyInst.count (Key)) {
183+ auto It = SuccBBCopyInst.find (Key);
184+ if (It == SuccBBCopyInst.end ()) {
184185 // Same copy not present in this successor
185186 IsSafetoMove = false ;
186187 break ;
187188 }
188189 // If present, make sure that it's safe to pull this copy instruction
189190 // into the predecessor.
190- MachineInstr *SuccMI = SuccBBCopyInst[Key] ;
191+ MachineInstr *SuccMI = It-> second ;
191192 if (!isSafetoMove (SuccMI)) {
192193 IsSafetoMove = false ;
193194 break ;
You can’t perform that action at this time.
0 commit comments