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

Ulrich Weigand via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 22 01:42:33 PST 2022


uweigand added inline comments.


================
Comment at: llvm/lib/Target/SystemZ/SystemZRegisterInfo.cpp:472
+                                             ISD::ArgFlagsTy &ArgFlags,
+                                             CCState &State) {
+  ArrayRef<MCPhysReg> RegList;
----------------
This whole series of functions still is quite confusing and seems really pointless to me.

If you want to answer the question: "identify whether a given register can be used for passing arguments when calling a function" on SystemZ, this is very simple: Just look at the existing lists
  ELFArgGPRs,  ELFArgFPRs  (for the ELF calling convention)
  XPLINK64ArgGPR,  XPLINK64ArgFPRs, XPLINK64ArgVRs (for the XPLINK calling convention)

This will correctly answer the above question without any need for TableGen generated routines or any of this additional code (which looks at those lists anyway, so it isn't even that those would be avoided ...).




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