mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-12 13:30:51 +00:00
Handle the special case of registers begin redefined by early-clobber defs.
In this case, the value need to be available at the load index instead of the normal use index. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127167 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6154f6c929
commit
a9d5c2715b
@ -779,6 +779,13 @@ void LiveIntervals::shrinkToUses(LiveInterval *li) {
|
||||
if (VNI->isUnused())
|
||||
continue;
|
||||
NewLI.addRange(LiveRange(VNI->def, VNI->def.getNextSlot(), VNI));
|
||||
|
||||
// A use tied to an early-clobber def ends at the load slot and isn't caught
|
||||
// above. Catch it here instead. This probably only ever happens for inline
|
||||
// assembly.
|
||||
if (VNI->def.isUse())
|
||||
if (VNInfo *UVNI = li->getVNInfoAt(VNI->def.getLoadIndex()))
|
||||
WorkList.push_back(std::make_pair(VNI->def.getLoadIndex(), UVNI));
|
||||
}
|
||||
|
||||
// Keep track of the PHIs that are in use.
|
||||
|
Loading…
Reference in New Issue
Block a user