markForSaveAcrossCalls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15317
91177308-0d34-0410-b5e6-
96231b3b80d8
int Color; // color assigned to this live range
bool mustSpill; // whether this LR must be spilt
int Color; // color assigned to this live range
bool mustSpill; // whether this LR must be spilt
- /// mustSaveAcrossCalls - whether this LR must be saved accross calls
- /// ***TODO REMOVE this
- ///
- bool mustSaveAcrossCalls;
-
/// SuggestedColor - if this LR has a suggested color, can it be
/// really alloated? A suggested color cannot be allocated when the
/// suggested color is volatile and when there are call
/// SuggestedColor - if this LR has a suggested color, can it be
/// really alloated? A suggested color cannot be allocated when the
/// suggested color is volatile and when there are call
public:
LiveRange() {
Color = SuggestedColor = -1; // not yet colored
public:
LiveRange() {
Color = SuggestedColor = -1; // not yet colored
- mustSpill = mustSaveAcrossCalls = false;
MyRegClass = 0;
UserIGNode = 0;
doesSpanAcrossCalls = false;
MyRegClass = 0;
UserIGNode = 0;
doesSpanAcrossCalls = false;
return SpilledStackOffsetFromFP;
}
return SpilledStackOffsetFromFP;
}
- inline void markForSaveAcrossCalls() { mustSaveAcrossCalls = true; }
-
inline void setUserIGNode(IGNode *IGN) {
assert(!UserIGNode); UserIGNode = IGN;
}
inline void setUserIGNode(IGNode *IGN) {
assert(!UserIGNode); UserIGNode = IGN;
}
// get the live range corresponding to live var
// since LR span across calls, must save across calls
//
// get the live range corresponding to live var
// since LR span across calls, must save across calls
//
- LR->markForSaveAcrossCalls();
if (DEBUG_RA)
std::cerr << "\n Colored after SECOND search with col " << c;
}
if (DEBUG_RA)
std::cerr << "\n Colored after SECOND search with col " << c;
}
if (ColorFound >= 0) {
LR->setColor(ColorFound); // first color found in preferred order
if (ColorFound >= 0) {
LR->setColor(ColorFound); // first color found in preferred order
- LR->markForSaveAcrossCalls();
} else {
// we are here because no color could be found
LR->markForSpill(); // no color found - must spill
} else {
// we are here because no color could be found
LR->markForSpill(); // no color found - must spill