This is an archive of the discontinued LLVM Phabricator instance.

RegAllocFast: Make self loop live-out heuristic more aggressive
ClosedPublic

Authored by arsenm on Aug 31 2020, 12:40 PM.

Details

Reviewers
qcolombet
MatzeB
Summary

This currently has no impact on code, but prevents sizeable code size
regressions after D52010. This prevents spilling and reloading all
values inside blocks that loop back. Add a baseline test which would
regress without this patch.

Diff Detail

Event Timeline

arsenm created this revision.Aug 31 2020, 12:40 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 31 2020, 12:40 PM
arsenm requested review of this revision.Aug 31 2020, 12:40 PM
qcolombet accepted this revision.Sep 2 2020, 12:09 PM

LGTM with one caveat, do we need the new getOneDefInstr?

llvm/lib/CodeGen/RegAllocFast.cpp
275

How does this differ from MachineRegisterInfo::getUniqueVRegDef?

This revision is now accepted and ready to land.Sep 2 2020, 12:09 PM