This is an archive of the discontinued LLVM Phabricator instance.

[TableGen] Speed up computeUberSets. NFC.
ClosedPublic

Authored by foad on Jan 24 2023, 7:06 AM.

Diff Detail

Event Timeline

foad created this revision.Jan 24 2023, 7:06 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 24 2023, 7:06 AM
Herald added a subscriber: StephenFan. · View Herald Transcript
foad requested review of this revision.Jan 24 2023, 7:06 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 24 2023, 7:06 AM
foad added a comment.Jan 24 2023, 7:08 AM

For AMDGPUGenRegisterInfo.in this speeds up computeUberSets from 11 ms to 0.4 ms. It is still dwarfed by other parts of CodeGenRegisters which take several seconds.

llvm/utils/TableGen/CodeGenRegisters.cpp
1707

This is very expensive and completely pointless, since the registers added to each uber set are unique and sorted by construction.

foad accepted this revision.Jan 25 2023, 5:48 AM

Self-approving, having checked that there are no differences in any of the generated .inc files for any in-tree targets, including experimental ones.

This revision is now accepted and ready to land.Jan 25 2023, 5:48 AM
This revision was automatically updated to reflect the committed changes.