diff options
author | Dale Johannesen <dalej@apple.com> | 2008-09-20 02:03:04 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2008-09-20 02:03:04 +0000 |
commit | 9af7b3daec41c994b6d78a5b029ab094f03229fe (patch) | |
tree | 0c8e69cd2040bc902aae365e9861a9421cc60152 /llvm/lib/CodeGen/RegAllocLinearScan.cpp | |
parent | bc15d8539dbd48d69eb441107262ad81fc0f69ca (diff) | |
download | bcm5719-llvm-9af7b3daec41c994b6d78a5b029ab094f03229fe.tar.gz bcm5719-llvm-9af7b3daec41c994b6d78a5b029ab094f03229fe.zip |
Teach coalescer about earlyclobber bits.
Check bits for preferred register.
llvm-svn: 56384
Diffstat (limited to 'llvm/lib/CodeGen/RegAllocLinearScan.cpp')
-rw-r--r-- | llvm/lib/CodeGen/RegAllocLinearScan.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/RegAllocLinearScan.cpp b/llvm/lib/CodeGen/RegAllocLinearScan.cpp index df9d393a8f4..5a1944fd5f9 100644 --- a/llvm/lib/CodeGen/RegAllocLinearScan.cpp +++ b/llvm/lib/CodeGen/RegAllocLinearScan.cpp @@ -1122,9 +1122,12 @@ unsigned RALinScan::getFreePhysReg(LiveInterval *cur) { unsigned FreeRegInactiveCount = 0; // If copy coalescer has assigned a "preferred" register, check if it's - // available first. + // available first. Coalescer can create new earlyclobber interferences, + // so we need to check that. if (cur->preference) { - if (prt_->isRegAvail(cur->preference) && RC->contains(cur->preference)) { + if (prt_->isRegAvail(cur->preference) && + RC->contains(cur->preference) && + noEarlyClobberConflict(cur, cur->preference)) { DOUT << "\t\tassigned the preferred register: " << tri_->getName(cur->preference) << "\n"; return cur->preference; |