[PATCH] D78570: [AMDGPU] Use RegClass helper functions in getRegForInlineAsmConstraint.

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 21 09:41:56 PDT 2020


foad marked an inline comment as done.
foad added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIISelLowering.cpp:10597-10599
       case 64:
         RC = &AMDGPU::SGPR_64RegClass;
         break;
----------------
I don't like having exceptions like this, where we override the class that getSGPRClassForBitWidth would return. There are similar things in e.g. SIRegisterInfo::getEquivalentSGPRClass.

Perhaps getSGPRClassForBitWidth et al should be split into two different helpers, "get allocatable class" and "get *something else* class". But I really don't understand the purpose and the naming of the SReg/VReg/AReg vs SGPR/VGPR/AGPR classes, so I'm not sure how to do that.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D78570





More information about the llvm-commits mailing list