mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-12 13:38:21 +00:00
Let callers decide the sub-register index on the def operand of rematerialized instructions.
Avoid remat'ing instructions whose def have sub-register indices for now. It's just really really hard to get all the cases right. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75900 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1157,6 +1157,11 @@ bool LiveIntervals::isReMaterializable(const LiveInterval &li,
|
||||
if (DisableReMat)
|
||||
return false;
|
||||
|
||||
// FIXME: For now, avoid remating instructions whose definition has a subreg
|
||||
// index. It's just incredibly difficult to get right.
|
||||
if (MI->findRegisterDefOperand(li.reg)->getSubReg())
|
||||
return false;
|
||||
|
||||
if (MI->getOpcode() == TargetInstrInfo::IMPLICIT_DEF)
|
||||
return true;
|
||||
|
||||
@ -1595,7 +1600,7 @@ rewriteInstructionForSpills(const LiveInterval &li, const VNInfo *VNI,
|
||||
|
||||
if (CreatedNewVReg) {
|
||||
if (DefIsReMat) {
|
||||
vrm.setVirtIsReMaterialized(NewVReg, ReMatDefMI/*, CanDelete*/);
|
||||
vrm.setVirtIsReMaterialized(NewVReg, ReMatDefMI);
|
||||
if (ReMatIds[VNI->id] == VirtRegMap::MAX_STACK_SLOT) {
|
||||
// Each valnum may have its own remat id.
|
||||
ReMatIds[VNI->id] = vrm.assignVirtReMatId(NewVReg);
|
||||
|
Reference in New Issue
Block a user