[PATCH] D120094: [CallingConv] Generate isArgumentRegister() predicate via tablegen

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 17 18:13:05 PST 2022


arsenm added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp:3060
+  ISD::ArgFlagsTy ArgFlags;
+  ArgFlags.setInReg();
+
----------------
void wrote:
> arsenm wrote:
> > Not sure why you need ArgFlags or are setting inreg here, you need to preserve this from the original IR
> I should explain better in the commit message what's going on.
> 
> The `ArgFlags` is here because some `*CallingConv.td` files have custom code in them to check these flags.
> 
> What all of this code is doing is simply saying whether or not a register is part of a calling convention. Because of that, I don't need to retain many of the flags and other stuff that's needed when allocating the register.
But if the code is checking them, and this is lying to it, what good is it? inreg can change the register/register class used for a parameter


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D120094



More information about the llvm-commits mailing list