mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-19 08:24:12 +00:00
Set an allocation hint when rematting before a COPY.
This almost guarantees that the COPY will be coalesced. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125140 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8a2bbdeee2
commit
c3dca3f9d4
@ -154,6 +154,10 @@ bool InlineSpiller::reMaterializeFor(MachineBasicBlock::iterator MI) {
|
||||
LiveInterval &NewLI = edit_->create(mri_, lis_, vrm_);
|
||||
NewLI.markNotSpillable();
|
||||
|
||||
// Rematting for a copy: Set allocation hint to be the destination register.
|
||||
if (MI->isCopy())
|
||||
mri_.setRegAllocationHint(NewLI.reg, 0, MI->getOperand(0).getReg());
|
||||
|
||||
// Finally we can rematerialize OrigMI before MI.
|
||||
SlotIndex DefIdx = edit_->rematerializeAt(*MI->getParent(), MI, NewLI.reg, RM,
|
||||
lis_, tii_, tri_);
|
||||
|
Loading…
x
Reference in New Issue
Block a user