mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-17 03:24:34 +00:00
Clean up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31359 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -719,7 +719,14 @@ int BURegReductionPriorityQueue<SF>::CalcNodePriority(const SUnit *SU) {
|
|||||||
return SethiUllmanNumber;
|
return SethiUllmanNumber;
|
||||||
|
|
||||||
unsigned Opc = SU->Node->getOpcode();
|
unsigned Opc = SU->Node->getOpcode();
|
||||||
if (Opc == ISD::TokenFactor || Opc == ISD::CopyToReg)
|
if (Opc == ISD::CopyFromReg && !isCopyFromLiveIn(SU))
|
||||||
|
// CopyFromReg should be close to its def because it restricts allocation
|
||||||
|
// choices. But if it is a livein then perhaps we want it closer to the
|
||||||
|
// uses so it can be coalesced.
|
||||||
|
SethiUllmanNumber = INT_MIN + 10;
|
||||||
|
else if (Opc == ISD::TokenFactor || Opc == ISD::CopyToReg)
|
||||||
|
// CopyToReg should be close to its uses to facilitate coalescing and avoid
|
||||||
|
// spilling.
|
||||||
SethiUllmanNumber = INT_MAX - 10;
|
SethiUllmanNumber = INT_MAX - 10;
|
||||||
else if (SU->NumSuccsLeft == 0)
|
else if (SU->NumSuccsLeft == 0)
|
||||||
// If SU does not have a use, i.e. it doesn't produce a value that would
|
// If SU does not have a use, i.e. it doesn't produce a value that would
|
||||||
@@ -727,10 +734,9 @@ int BURegReductionPriorityQueue<SF>::CalcNodePriority(const SUnit *SU) {
|
|||||||
// Give it a small SethiUllman number so it will be scheduled right before its
|
// Give it a small SethiUllman number so it will be scheduled right before its
|
||||||
// predecessors that it doesn't lengthen their live ranges.
|
// predecessors that it doesn't lengthen their live ranges.
|
||||||
SethiUllmanNumber = INT_MIN + 10;
|
SethiUllmanNumber = INT_MIN + 10;
|
||||||
// FIXME: remove this else if? It seems to reduce register spills but often
|
else if (SU->NumPredsLeft == 0)
|
||||||
// ends up increasing runtime. Need to investigate.
|
// If SU does not have a def, schedule it close to its uses because it does
|
||||||
else if (SU->NumPredsLeft == 0 &&
|
// not lengthen any live ranges.
|
||||||
(Opc != ISD::CopyFromReg || isCopyFromLiveIn(SU)))
|
|
||||||
SethiUllmanNumber = INT_MAX - 10;
|
SethiUllmanNumber = INT_MAX - 10;
|
||||||
else {
|
else {
|
||||||
int Extra = 0;
|
int Extra = 0;
|
||||||
|
Reference in New Issue
Block a user