mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 22:24:07 +00:00
Kill and collapse outstanding DomainValues.
DomainValues that are only used by "don't care" instructions are now collapsed to the first possible execution domain after all basic blocks have been processed. This typically means the PS domain on x86. For example, the vsel_i64 and vsel_double functions in sse2-blend.ll are completely collapsed to the PS domain instead of containing a mix of execution domains created by isel. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144037 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -510,11 +510,20 @@ bool ExeDepsFix::runOnMachineFunction(MachineFunction &mf) {
|
||||
leaveBasicBlock(MBB);
|
||||
}
|
||||
|
||||
// Clear the LiveOuts vectors. Should we also collapse any remaining
|
||||
// DomainValues?
|
||||
for (LiveOutMap::const_iterator i = LiveOuts.begin(), e = LiveOuts.end();
|
||||
i != e; ++i)
|
||||
delete[] i->second;
|
||||
// Clear the LiveOuts vectors and collapse any remaining DomainValues.
|
||||
for (ReversePostOrderTraversal<MachineBasicBlock*>::rpo_iterator
|
||||
MBBI = RPOT.begin(), MBBE = RPOT.end(); MBBI != MBBE; ++MBBI) {
|
||||
LiveOutMap::const_iterator FI = LiveOuts.find(*MBBI);
|
||||
if (FI == LiveOuts.end())
|
||||
continue;
|
||||
assert(FI->second && "Null entry");
|
||||
// The DomainValue is collapsed when the last reference is killed.
|
||||
LiveRegs = FI->second;
|
||||
for (unsigned i = 0, e = NumRegs; i != e; ++i)
|
||||
if (LiveRegs[i])
|
||||
Kill(i);
|
||||
delete[] LiveRegs;
|
||||
}
|
||||
LiveOuts.clear();
|
||||
Avail.clear();
|
||||
Allocator.DestroyAll();
|
||||
|
Reference in New Issue
Block a user