diff options
author | Dan Gohman <gohman@apple.com> | 2008-10-04 00:31:14 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-10-04 00:31:14 +0000 |
commit | 022b21ff7c047f8c1615a6588052c55427bcd9b0 (patch) | |
tree | 26da2035d0b767936c607a58c261ee6d5a4cdead /lib/CodeGen/RegAllocLocal.cpp | |
parent | 880ae364ba4ed3d63542a2ef934980c70e8bb9d7 (diff) | |
download | external_llvm-022b21ff7c047f8c1615a6588052c55427bcd9b0.zip external_llvm-022b21ff7c047f8c1615a6588052c55427bcd9b0.tar.gz external_llvm-022b21ff7c047f8c1615a6588052c55427bcd9b0.tar.bz2 |
Fix a bug in the local allocator's liveness computation where it
was setting kill flags on tied uses in two-address instructions.
The kill flags were causing the allocator to think it could
allocate the use and its tied def in different registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57039 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/RegAllocLocal.cpp')
-rw-r--r-- | lib/CodeGen/RegAllocLocal.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/CodeGen/RegAllocLocal.cpp b/lib/CodeGen/RegAllocLocal.cpp index 2530663..82691ba 100644 --- a/lib/CodeGen/RegAllocLocal.cpp +++ b/lib/CodeGen/RegAllocLocal.cpp @@ -651,9 +651,11 @@ void RALocal::ComputeLocalLiveness(MachineBasicBlock& MBB) { // Physical registers and those that are not live-out of the block // are killed/dead at their last use/def within this block. if (isPhysReg || !usedOutsideBlock) { - if (MO.isUse()) - MO.setIsKill(true); - else + if (MO.isUse()) { + // Don't mark uses that are tied to defs as kills. + if (MI->getDesc().getOperandConstraint(idx, TOI::TIED_TO) == -1) + MO.setIsKill(true); + } else MO.setIsDead(true); } } |