diff options
| author | Andrew Trick <atrick@apple.com> | 2013-11-29 23:49:38 +0000 |
|---|---|---|
| committer | Andrew Trick <atrick@apple.com> | 2013-11-29 23:49:38 +0000 |
| commit | c2ab53a318c7c9fa5cc6ede0bf633fbda8abfcf8 (patch) | |
| tree | 8697d4d6f3f48ebbe7d1910c12369f3e1c927aa9 /llvm/lib/CodeGen/RegAllocGreedy.cpp | |
| parent | ad450f239fa271e82b57f629257b755b4da113ac (diff) | |
| download | bcm5719-llvm-c2ab53a318c7c9fa5cc6ede0bf633fbda8abfcf8.tar.gz bcm5719-llvm-c2ab53a318c7c9fa5cc6ede0bf633fbda8abfcf8.zip | |
Reverse the order of eviction checks for possible compile time savings. No functionality.
llvm-svn: 195969
Diffstat (limited to 'llvm/lib/CodeGen/RegAllocGreedy.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/RegAllocGreedy.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/RegAllocGreedy.cpp b/llvm/lib/CodeGen/RegAllocGreedy.cpp index 27dc07b54c9..3a02aaec344 100644 --- a/llvm/lib/CodeGen/RegAllocGreedy.cpp +++ b/llvm/lib/CodeGen/RegAllocGreedy.cpp @@ -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; |

