[PATCH] D138531: [PATCH] [NVPTX] Backend support for variadic functions

Artem Belevich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 12 12:05:47 PST 2022


tra accepted this revision.
tra added inline comments.
This revision is now accepted and ready to land.


================
Comment at: llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp:2617
 
-SDValue
-NVPTXTargetLowering::getParamSymbol(SelectionDAG &DAG, int idx, EVT v) const {
+SDValue NVPTXTargetLowering::getParamSymbol(SelectionDAG &DAG, int idx, EVT v,
+                                            bool isVarArg) const {
----------------
Nit: We could define and use  `VARARG_IDX = -1` or just document that a negative index is for a vararg, instead of adding a new `isVarArg` argument. 
The call would just use `/* vararg*/ -1` which is a slight improvement, IMO over having to use the comment *and* an extra argument.



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D138531



More information about the llvm-commits mailing list