[all-commits] [llvm/llvm-project] 0e1768: [AMDGPU] Speed up SIRegisterInfo::getReservedRegs ...
Jay Foad via All-commits
all-commits at lists.llvm.org
Tue Jan 30 03:32:28 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0e17684cf5ce3b99e8f732f53c3534990ad91fd5
https://github.com/llvm/llvm-project/commit/0e17684cf5ce3b99e8f732f53c3534990ad91fd5
Author: Jay Foad <jay.foad at amd.com>
Date: 2024-01-30 (Tue, 30 Jan 2024)
Changed paths:
M llvm/include/llvm/CodeGen/TargetRegisterInfo.h
M llvm/include/llvm/MC/MCRegisterInfo.h
M llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
M llvm/unittests/CodeGen/MachineInstrTest.cpp
M llvm/utils/TableGen/RegisterInfoEmitter.cpp
Log Message:
-----------
[AMDGPU] Speed up SIRegisterInfo::getReservedRegs (#79844)
reserveRegisterTuples is slow because it uses MCRegAliasIterator and
hence ends up reserving the same aliased registers many times. This
patch changes getReservedRegs not to use it for reserving SGPRs, VGPRs
and AGPRs. Instead it iterates through base register classes, which
should come closer to reserving each register once only.
Overall this speeds up the time to run check-llvm-codegen-amdgpu in my
Release build from 18.4 seconds to 16.9 seconds (all timings +/- 0.2).
More information about the All-commits
mailing list