mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-05-19 13:38:56 +00:00
Re-commit 127368 and 127371. They are exonerated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127380 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
02d7c92982
commit
b0519e15f7
@ -588,11 +588,13 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// getCrossCopyRegClass - Returns a legal register class to copy a register
|
/// getCrossCopyRegClass - Returns a legal register class to copy a register
|
||||||
/// in the specified class to or from. Returns NULL if it is possible to copy
|
/// in the specified class to or from. If it is possible to copy the register
|
||||||
/// between a two registers of the specified class.
|
/// directly without using a cross register class copy, return the specified
|
||||||
|
/// RC. Returns NULL if it is not possible to copy between a two registers of
|
||||||
|
/// the specified class.
|
||||||
virtual const TargetRegisterClass *
|
virtual const TargetRegisterClass *
|
||||||
getCrossCopyRegClass(const TargetRegisterClass *RC) const {
|
getCrossCopyRegClass(const TargetRegisterClass *RC) const {
|
||||||
return NULL;
|
return RC;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// getRegPressureLimit - Return the register pressure "high water mark" for
|
/// getRegPressureLimit - Return the register pressure "high water mark" for
|
||||||
|
@ -570,13 +570,20 @@ void ScheduleDAGFast::ListScheduleBottomUp() {
|
|||||||
TRI->getMinimalPhysRegClass(Reg, VT);
|
TRI->getMinimalPhysRegClass(Reg, VT);
|
||||||
const TargetRegisterClass *DestRC = TRI->getCrossCopyRegClass(RC);
|
const TargetRegisterClass *DestRC = TRI->getCrossCopyRegClass(RC);
|
||||||
|
|
||||||
// If cross copy register class is null, then it must be possible copy
|
// If cross copy register class is the same as RC, then it must be
|
||||||
// the value directly. Do not try duplicate the def.
|
// possible copy the value directly. Do not try duplicate the def.
|
||||||
|
// If cross copy register class is not the same as RC, then it's
|
||||||
|
// possible to copy the value but it require cross register class copies
|
||||||
|
// and it is expensive.
|
||||||
|
// If cross copy register class is null, then it's not possible to copy
|
||||||
|
// the value at all.
|
||||||
SUnit *NewDef = 0;
|
SUnit *NewDef = 0;
|
||||||
if (DestRC)
|
if (DestRC != RC) {
|
||||||
NewDef = CopyAndMoveSuccessors(LRDef);
|
NewDef = CopyAndMoveSuccessors(LRDef);
|
||||||
else
|
if (!DestRC && !NewDef)
|
||||||
DestRC = RC;
|
report_fatal_error("Can't handle live physical "
|
||||||
|
"register dependency!");
|
||||||
|
}
|
||||||
if (!NewDef) {
|
if (!NewDef) {
|
||||||
// Issue copies, these can be expensive cross register class copies.
|
// Issue copies, these can be expensive cross register class copies.
|
||||||
SmallVector<SUnit*, 2> Copies;
|
SmallVector<SUnit*, 2> Copies;
|
||||||
|
@ -1140,13 +1140,19 @@ SUnit *ScheduleDAGRRList::PickNodeToScheduleBottomUp() {
|
|||||||
TRI->getMinimalPhysRegClass(Reg, VT);
|
TRI->getMinimalPhysRegClass(Reg, VT);
|
||||||
const TargetRegisterClass *DestRC = TRI->getCrossCopyRegClass(RC);
|
const TargetRegisterClass *DestRC = TRI->getCrossCopyRegClass(RC);
|
||||||
|
|
||||||
// If cross copy register class is null, then it must be possible copy
|
// If cross copy register class is the same as RC, then it must be possible
|
||||||
// the value directly. Do not try duplicate the def.
|
// copy the value directly. Do not try duplicate the def.
|
||||||
|
// If cross copy register class is not the same as RC, then it's possible to
|
||||||
|
// copy the value but it require cross register class copies and it is
|
||||||
|
// expensive.
|
||||||
|
// If cross copy register class is null, then it's not possible to copy
|
||||||
|
// the value at all.
|
||||||
SUnit *NewDef = 0;
|
SUnit *NewDef = 0;
|
||||||
if (DestRC)
|
if (DestRC != RC) {
|
||||||
NewDef = CopyAndMoveSuccessors(LRDef);
|
NewDef = CopyAndMoveSuccessors(LRDef);
|
||||||
else
|
if (!DestRC && !NewDef)
|
||||||
DestRC = RC;
|
report_fatal_error("Can't handle live physical register dependency!");
|
||||||
|
}
|
||||||
if (!NewDef) {
|
if (!NewDef) {
|
||||||
// Issue copies, these can be expensive cross register class copies.
|
// Issue copies, these can be expensive cross register class copies.
|
||||||
SmallVector<SUnit*, 2> Copies;
|
SmallVector<SUnit*, 2> Copies;
|
||||||
|
@ -337,7 +337,7 @@ X86RegisterInfo::getCrossCopyRegClass(const TargetRegisterClass *RC) const {
|
|||||||
else
|
else
|
||||||
return &X86::GR32RegClass;
|
return &X86::GR32RegClass;
|
||||||
}
|
}
|
||||||
return NULL;
|
return RC;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned
|
unsigned
|
||||||
|
Loading…
x
Reference in New Issue
Block a user