mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-12 01:25:49 +00:00
- Remove the previous check which broke coalescer-commute3.ll
- For now, conservatively ignore copy MI whose source is a physical register. Commuting its def MI can cause a physical register live interval to be live through a loop (since we know it's live coming into the def MI). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47281 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -247,11 +247,11 @@ bool SimpleRegisterCoalescing::RemoveCopyByCommutingDef(LiveInterval &IntA,
|
|||||||
|
|
||||||
unsigned CopyIdx = li_->getDefIndex(li_->getInstructionIndex(CopyMI));
|
unsigned CopyIdx = li_->getDefIndex(li_->getInstructionIndex(CopyMI));
|
||||||
|
|
||||||
// FIXME: For now, only eliminate the copy by commuting its def is the source
|
// FIXME: For now, only eliminate the copy by commuting its def when the
|
||||||
// does not live pass the move. Coalescing those copies may end up may simply
|
// source register is a virtual register. We want to guard against cases
|
||||||
// end up swapping a live interval for another. That and because usually only
|
// where the copy is a back edge copy and commuting the def lengthen the
|
||||||
// the non-two address operand can be folded can end up pessimizing the code.
|
// live interval of the source register to the entire loop.
|
||||||
if (CopyMI->findRegisterUseOperandIdx(IntA.reg, true) != -1)
|
if (TargetRegisterInfo::isPhysicalRegister(IntA.reg))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// BValNo is a value number in B that is defined by a copy from A. 'B3' in
|
// BValNo is a value number in B that is defined by a copy from A. 'B3' in
|
||||||
|
Reference in New Issue
Block a user