mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-15 07:39:31 +00:00
For now, avoid commuting def MI for copy MI's whose source is not killed. That simply trade a live interval for another and because only the non-two-address operands can be folded into loads, may end up pessimising code.
llvm-svn: 47262
This commit is contained in:
parent
b22dbdf4fc
commit
6eeae5bd62
@ -247,6 +247,13 @@ bool SimpleRegisterCoalescing::RemoveCopyByCommutingDef(LiveInterval &IntA,
|
||||
|
||||
unsigned CopyIdx = li_->getDefIndex(li_->getInstructionIndex(CopyMI));
|
||||
|
||||
// FIXME: For now, only eliminate the copy by commuting its def is the source
|
||||
// does not live pass the move. Coalescing those copies may end up may simply
|
||||
// end up swapping a live interval for another. That and because usually only
|
||||
// the non-two address operand can be folded can end up pessimizing the code.
|
||||
if (CopyMI->findRegisterUseOperandIdx(IntA.reg, true) != -1)
|
||||
return false;
|
||||
|
||||
// BValNo is a value number in B that is defined by a copy from A. 'B3' in
|
||||
// the example above.
|
||||
LiveInterval::iterator BLR = IntB.FindLiveRangeContaining(CopyIdx);
|
||||
|
Loading…
Reference in New Issue
Block a user