Copy coalescing change to prevent a physical register from being pin to a
authorEvan Cheng <evan.cheng@apple.com>
Tue, 17 Apr 2007 20:32:26 +0000 (20:32 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Tue, 17 Apr 2007 20:32:26 +0000 (20:32 +0000)
commit20b0abc24fb3fa15098b7cb12c7762fb0770e133
tree1dbd398745011aac088215cfb9abe422d3f8c140
parent58ff01253955e67eba7830f58f777687e1f381a9
Copy coalescing change to prevent a physical register from being pin to a
long live interval that has low usage density.
1. Change order of coalescing to join physical registers with virtual
   registers first before virtual register intervals become too long.
2. Check size and usage density to determine if it's worthwhile to join.
3. If joining is aborted, assign virtual register live interval allocation
   preference field to the physical register.
4. Register allocator should try to allocate to the preferred register
   first (if available) to create identify moves that can be eliminated.

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