[PATCH] D111764: [AMDGPU] Allow to use a whole register file on gfx90a for VGPRs

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 13 16:54:58 PDT 2021


rampitec added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h:953
+  // \returns true if a function needs or may need AGPRs.
+  bool usesAGPRs(const MachineFunction &MF) const;
 };
----------------
AlexVlx wrote:
> Why not just make this a manipulator (delete the trailing const) and get rid of mutable? It's just a stylistic issue so feel free to ignore.
Because getReservedRegs takes const MF. So it is either mutable or I will have to use const_cast somewhere. I prefer mutable in this case as it is just lazily computed and cached rather than actually changing the MFI. The effects of this mutation are unobservable outside of the accessor.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D111764/new/

https://reviews.llvm.org/D111764



More information about the llvm-commits mailing list