Add a smarter heuristic to determine when to coalesce a virtual register with a physi...
authorEvan Cheng <evan.cheng@apple.com>
Thu, 30 Apr 2009 18:39:57 +0000 (18:39 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Thu, 30 Apr 2009 18:39:57 +0000 (18:39 +0000)
commit0490dcb1b73f2668ad12b7f45962500aaa3fc471
tree4bfd2da0775b963eb096c1565ded282c5b50b313
parent440548dd1f78682e372a38cacccf7c5ac1781b2c
Add a smarter heuristic to determine when to coalesce a virtual register with a physical one. More specifically, it avoid tying a virtual register in the loop with a physical register defined / used outside the loop. When it determines it's not profitable, it will use the physical register as the allocation preference instead.

This is *not* turned on by default. Testing indicates this is just as likely to pessimize code. The main issue seems to be allocation preference doesn't work effectively. That will change once I've taught register allocator "swapping".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70503 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SimpleRegisterCoalescing.cpp
lib/CodeGen/SimpleRegisterCoalescing.h