Skip to content
This repository was archived by the owner on Sep 2, 2018. It is now read-only.

Commit 7f4cc26

Browse files
author
Dylan McKay
committed
[AVR] Removed regalloc hack from CalcSpillWeights
The hack was in place as a fix for issue #1 (documented in AVR-LLVM) and corresponds to LLVM bug PR14879. The hack is being removed so that a better fix can be created.
1 parent 7afcd3c commit 7f4cc26

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

lib/CodeGen/CalcSpillWeights.cpp

+1-14
Original file line numberDiff line numberDiff line change
@@ -180,20 +180,7 @@ VirtRegAuxInfo::calculateSpillWeightAndHint(LiveInterval &li) {
180180

181181
// Mark li as unspillable if all live ranges are tiny.
182182
if (li.isZeroLength(LIS.getSlotIndexes())) {
183-
// HACK HACK: This is a workaround until PR14879 gets fixed!
184-
// This code allows us to compile memory intensive functions when only the Z
185-
// register is available, otherwise we get the "Ran out of registers ..."
186-
// assertion inside the regalloc.
187-
// Here we avoid marking as not spillable live intervals that use the
188-
// PTRDISPREGS class and have a size greater than 8, smaller ones
189-
// get filtered out, generating better code.
190-
if (strcmp(MF.getSubtarget().getRegisterInfo()->getRegClassName(mri.getRegClass(li.reg)), "PTRDISPREGS") == 0 &&
191-
li.getSize() > 8) {
192-
totalWeight *= 10000.0F;
193-
li.weight = normalizeSpillWeight(totalWeight, li.getSize(), numInstr);
194-
} else {
195-
li.markNotSpillable();
196-
}
183+
li.markNotSpillable();
197184
return;
198185
}
199186

0 commit comments

Comments
 (0)