This is an archive of the discontinued LLVM Phabricator instance.

[TargetRegisterInfo] Speed up getAllocatableSet. NFCI.
ClosedPublic

Authored by foad on May 12 2021, 1:39 AM.

Details

Summary

MachineRegisterInfo caches the reserved register set that is computed by
by TargetRegisterInfo::getReservedRegs, so call into MRI to get the
reserved regs to avoid recomputing them.

In particular this speeds up AMDGPU's SIFormMemoryClauses pass because
AMDGPU has a particularly complicated reserved set that is expensive to
compute.

Diff Detail

Event Timeline

foad created this revision.May 12 2021, 1:39 AM
foad requested review of this revision.May 12 2021, 1:40 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 12 2021, 1:40 AM
arsenm accepted this revision.May 12 2021, 5:37 AM
This revision is now accepted and ready to land.May 12 2021, 5:37 AM
This revision was landed with ongoing or failed builds.May 12 2021, 6:09 AM
This revision was automatically updated to reflect the committed changes.