mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 20:29:48 +00:00
Handle SUBREG_TO_REG instructions with the same heuristics
as INSERT_SUBREG instructions in the list-burr scheduler. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69308 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8170a6849e
commit
8af808a3d6
@ -1019,9 +1019,10 @@ namespace {
|
|||||||
// avoid spilling.
|
// avoid spilling.
|
||||||
return 0;
|
return 0;
|
||||||
if (Opc == TargetInstrInfo::EXTRACT_SUBREG ||
|
if (Opc == TargetInstrInfo::EXTRACT_SUBREG ||
|
||||||
|
Opc == TargetInstrInfo::SUBREG_TO_REG ||
|
||||||
Opc == TargetInstrInfo::INSERT_SUBREG)
|
Opc == TargetInstrInfo::INSERT_SUBREG)
|
||||||
// EXTRACT_SUBREG / INSERT_SUBREG should be close to its use to
|
// EXTRACT_SUBREG, INSERT_SUBREG, and SUBREG_TO_REG nodes should be
|
||||||
// facilitate coalescing.
|
// close to their uses to facilitate coalescing.
|
||||||
return 0;
|
return 0;
|
||||||
if (SU->NumSuccs == 0 && SU->NumPreds != 0)
|
if (SU->NumSuccs == 0 && SU->NumPreds != 0)
|
||||||
// If SU does not have a register use, i.e. it doesn't produce a value
|
// If SU does not have a register use, i.e. it doesn't produce a value
|
||||||
@ -1396,11 +1397,12 @@ void RegReductionPriorityQueue<SF>::AddPseudoTwoAddrDeps() {
|
|||||||
if (canClobberPhysRegDefs(SuccSU, SU, TII, TRI))
|
if (canClobberPhysRegDefs(SuccSU, SU, TII, TRI))
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// Don't constrain extract_subreg / insert_subreg; these may be
|
// Don't constrain EXTRACT_SUBREG, INSERT_SUBREG, and SUBREG_TO_REG;
|
||||||
// coalesced away. We want them close to their uses.
|
// these may be coalesced away. We want them close to their uses.
|
||||||
unsigned SuccOpc = SuccSU->getNode()->getMachineOpcode();
|
unsigned SuccOpc = SuccSU->getNode()->getMachineOpcode();
|
||||||
if (SuccOpc == TargetInstrInfo::EXTRACT_SUBREG ||
|
if (SuccOpc == TargetInstrInfo::EXTRACT_SUBREG ||
|
||||||
SuccOpc == TargetInstrInfo::INSERT_SUBREG)
|
SuccOpc == TargetInstrInfo::INSERT_SUBREG ||
|
||||||
|
SuccOpc == TargetInstrInfo::SUBREG_TO_REG)
|
||||||
continue;
|
continue;
|
||||||
if ((!canClobber(SuccSU, DUSU) ||
|
if ((!canClobber(SuccSU, DUSU) ||
|
||||||
(hasCopyToRegUse(SU) && !hasCopyToRegUse(SuccSU)) ||
|
(hasCopyToRegUse(SU) && !hasCopyToRegUse(SuccSU)) ||
|
||||||
|
Loading…
Reference in New Issue
Block a user