This repository was archived by the owner on Sep 2, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -180,7 +180,20 @@ VirtRegAuxInfo::calculateSpillWeightAndHint(LiveInterval &li) {
180
180
181
181
// Mark li as unspillable if all live ranges are tiny.
182
182
if (li.isZeroLength (LIS.getSlotIndexes ())) {
183
- li.markNotSpillable ();
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
+ }
184
197
return ;
185
198
}
186
199
You can’t perform that action at this time.
0 commit comments