[PATCH] D140581: [NVPTX] Enforce minumum alignment of 4 for byval parametrs in a function prototype
Pavel Kopyl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 6 16:31:04 PST 2023
pavelkopyl added inline comments.
================
Comment at: llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp:1428
+ // emitFunctionParamList() for details.
+ ParamByValAlign = std::max(ParamByValAlign, Align(4));
+
----------------
tra wrote:
> This seems to be the same adjustment we do in `LowerCall` below. Perhaps we can consolidate alignment calculation into a single helper function.
Thank you for suggestion. Actually I introduced a helper to use in all three places: emitFunctionParamList (in AsmPrinter), getPrototype and LowerCall. Is that OK?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140581/new/
https://reviews.llvm.org/D140581
More information about the llvm-commits
mailing list