TableGen: Only build the register bank in CallingConvEmitter when needed (#239306)
CallingConvEmitter built the register bank to find registers named by
strings, which only CCAssignToRegTuple uses. No target does, but
building the register bank is most of the work for targets with many
registers. Build it when the first register name is looked up instead.
All 16 CallingConv tablegen runs in an LLVM build with all targets:
Gigainstructions Gigacycles CPU seconds
Before 73.5 43.4 15.1
After 47.1 (-35.9%) 27.7 (-36.2%) 10.2 (-32.2%)
For AMDGPU alone, the run executes 63% fewer cycles.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>