Page MenuHomePhabricator

RegAllocFast: Remove early selection loop, the spill calculation will report cost 0 anyway for free regs

Authored by arsenm on Nov 9 2018, 4:31 PM.



The 2nd loop calculates spill costs but reports free registers as cost 0 anyway, so there is little benefit from having a separate early loop.

SUrprisingly this is not NFC, as many register are marked regDisabled so the first loop often picks up later registers unnecessarily instead of the first one available in the allocation order...

Diff Detail

Event Timeline

MatzeB created this revision.Nov 9 2018, 4:31 PM
MatzeB added a comment.Nov 9 2018, 4:31 PM

This is part of my regallocfast rewrite series, see also D52010

arsenm added a comment.Jan 9 2019, 8:40 PM

ping, I'm depending on this set of patches for D55301

qcolombet accepted this revision.Jan 23 2019, 1:30 PM
This revision is now accepted and ready to land.Jan 23 2019, 1:30 PM
arsenm commandeered this revision.Feb 22 2019, 1:29 PM
arsenm edited reviewers, added: MatzeB; removed: arsenm.
Herald added a project: Restricted Project. · View Herald TranscriptFeb 22 2019, 1:29 PM
Herald added a subscriber: jdoerfert. · View Herald Transcript
arsenm updated this revision to Diff 187977.Feb 22 2019, 1:30 PM

Test fixes

arsenm updated this revision to Diff 190633.Mar 14 2019, 8:04 AM

Rebase test fixes

arsenm closed this revision.Mar 19 2019, 12:00 PM


This introduced a test failure in clang (CodeGen/arm64-microsoft-status-reg.cpp, part of check-clang-codegen). I sent a quick fix in D59557. I have commit access but I'm not confident it's the right fix, so I'd appreciate a review of that.