Joining a live interval of a physical register with a virtual one can turn out
authorEvan Cheng <evan.cheng@apple.com>
Sat, 17 Mar 2007 09:27:35 +0000 (09:27 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Sat, 17 Mar 2007 09:27:35 +0000 (09:27 +0000)
commitba1a3df608a14ca37ca944f4c942c202e919ea80
tree5191a09840c794e5d7f7ddb5c7da926761637b8e
parentdb264ae07f451cbd5bb33d528ae00e4910ce386b
Joining a live interval of a physical register with a virtual one can turn out
to be really bad. Once they are joined they are not broken apart. Also, physical
intervals cannot be spilled!

Added a heuristic as a workaround for this. Be careful coalescing with a
physical register if the virtual register uses are "far". Check if there are
uses in the same loop as the source (copy instruction). Check if it is in the
loop preheader, etc.

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