[llvm] [NFC][AMDGPU] Compute always reserved registers once (PR #132006)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 21 03:00:32 PDT 2025
================
@@ -680,6 +684,12 @@ BitVector SIRegisterInfo::getReservedRegs(const MachineFunction &MF) const {
// Reserve null register - it shall never be allocated
reserveRegisterTuples(Reserved, AMDGPU::SGPR_NULL64);
+ return this->AlwaysReservedRegs = Reserved;
----------------
jayfoad wrote:
This copies the bitvector, right? Could avoid that with std::move or by making Reserved a reference to AlwaysReservedRegs in the first place.
https://github.com/llvm/llvm-project/pull/132006
More information about the llvm-commits
mailing list