Re-apply 56835 along with header file changes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56848 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng
2008-09-30 15:44:16 +00:00
parent f3b23188d5
commit dc37786595
5 changed files with 112 additions and 10 deletions

View File

@ -2361,7 +2361,8 @@ bool SimpleRegisterCoalescing::runOnMachineFunction(MachineFunction &fn) {
LI.weight = HUGE_VALF;
else {
bool isLoad = false;
if (li_->isReMaterializable(LI, isLoad)) {
SmallVector<LiveInterval*, 4> SpillIs;
if (li_->isReMaterializable(LI, SpillIs, isLoad)) {
// If all of the definitions of the interval are re-materializable,
// it is a preferred candidate for spilling. If non of the defs are
// loads, then it's potentially very cheap to re-materialize.