Skip to content
Snippets Groups Projects
Commit c2ab53a3 authored by Andrew Trick's avatar Andrew Trick
Browse files

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

llvm-svn: 195969
parent ad450f23
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment