diff options
| author | Bob Wilson <bob.wilson@apple.com> | 2009-04-09 17:16:43 +0000 |
|---|---|---|
| committer | Bob Wilson <bob.wilson@apple.com> | 2009-04-09 17:16:43 +0000 |
| commit | 51856173c8848b5aeed0b9e56fba2353a02842ab (patch) | |
| tree | 7f9e07aef2f8ad77cd87179a5421db3f72509866 /llvm/lib/CodeGen/PreAllocSplitting.cpp | |
| parent | 38533d48ddac4dba0c237470c7bb60308a2bc8cf (diff) | |
| download | bcm5719-llvm-51856173c8848b5aeed0b9e56fba2353a02842ab.tar.gz bcm5719-llvm-51856173c8848b5aeed0b9e56fba2353a02842ab.zip | |
Fix pr3954. The register scavenger asserts for inline assembly with
register destinations that are tied to source operands. The
TargetInstrDescr::findTiedToSrcOperand method silently fails for inline
assembly. The existing MachineInstr::isRegReDefinedByTwoAddr was very
close to doing what is needed, so this revision makes a few changes to
that method and also renames it to isRegTiedToUseOperand (for consistency
with the very similar isRegTiedToDefOperand and because it handles both
two-address instructions and inline assembly with tied registers).
llvm-svn: 68714
Diffstat (limited to 'llvm/lib/CodeGen/PreAllocSplitting.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/PreAllocSplitting.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/PreAllocSplitting.cpp b/llvm/lib/CodeGen/PreAllocSplitting.cpp index d9775f9f0d8..c4bda4862e1 100644 --- a/llvm/lib/CodeGen/PreAllocSplitting.cpp +++ b/llvm/lib/CodeGen/PreAllocSplitting.cpp @@ -803,7 +803,7 @@ void PreAllocSplitting::RenumberValno(VNInfo* VN) { MachineInstr* MI = LIs->getInstructionFromIndex(*KI); unsigned DefIdx = MI->findRegisterDefOperandIdx(CurrLI->reg); if (DefIdx == ~0U) continue; - if (MI->isRegReDefinedByTwoAddr(DefIdx)) { + if (MI->isRegTiedToUseOperand(DefIdx)) { VNInfo* NextVN = CurrLI->findDefinedVNInfo(LiveIntervals::getDefIndex(*KI)); if (NextVN == OldVN) continue; @@ -1214,7 +1214,7 @@ unsigned PreAllocSplitting::getNumberOfNonSpills( NonSpills++; int DefIdx = (*UI)->findRegisterDefOperandIdx(Reg); - if (DefIdx != -1 && (*UI)->isRegReDefinedByTwoAddr(DefIdx)) + if (DefIdx != -1 && (*UI)->isRegTiedToUseOperand(DefIdx)) FeedsTwoAddr = true; } |

