Reverse the order of eviction checks for possible compile time savings. No functionality.

llvm-svn: 195969
This commit is contained in:
Andrew Trick 2013-11-29 23:49:38 +00:00
parent ad450f239f
commit c2ab53a318
1 changed files with 3 additions and 3 deletions

View File

@ -627,6 +627,9 @@ bool RAGreedy::canEvictInterference(LiveInterval &VirtReg, unsigned PhysReg,
return false;
if (Urgent)
continue;
// Apply the eviction policy for non-urgent evictions.
if (!shouldEvict(VirtReg, IsHint, *Intf, BreaksHint))
return false;
// If !MaxCost.isMax(), then we're just looking for a cheap register.
// Evicting another local live range in this case could lead to suboptimal
// coloring.
@ -634,9 +637,6 @@ bool RAGreedy::canEvictInterference(LiveInterval &VirtReg, unsigned PhysReg,
!canReassign(*Intf, PhysReg)) {
return false;
}
// Finally, apply the eviction policy for non-urgent evictions.
if (!shouldEvict(VirtReg, IsHint, *Intf, BreaksHint))
return false;
}
}
MaxCost = Cost;