[all-commits] [llvm/llvm-project] a171b8: [NVPTX] Refactor NVPTXLowerArgs and move helpers t...
Alex MacLean via All-commits
all-commits at lists.llvm.org
Mon Mar 2 10:30:59 PST 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a171b8d4d5231363d99d11b9546e1fc1ed0d0323
https://github.com/llvm/llvm-project/commit/a171b8d4d5231363d99d11b9546e1fc1ed0d0323
Author: Alex MacLean <amaclean at nvidia.com>
Date: 2026-03-02 (Mon, 02 Mar 2026)
Changed paths:
M llvm/lib/Target/NVPTX/CMakeLists.txt
M llvm/lib/Target/NVPTX/NVPTX.h
M llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
M llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp
M llvm/lib/Target/NVPTX/NVPTXISelLowering.h
M llvm/lib/Target/NVPTX/NVPTXLowerArgs.cpp
A llvm/lib/Target/NVPTX/NVPTXMarkKernelPtrsGlobal.cpp
M llvm/lib/Target/NVPTX/NVPTXPassRegistry.def
M llvm/lib/Target/NVPTX/NVPTXTargetMachine.cpp
M llvm/lib/Target/NVPTX/NVPTXUtilities.cpp
M llvm/lib/Target/NVPTX/NVPTXUtilities.h
M llvm/test/CodeGen/NVPTX/lower-args.ll
M llvm/test/CodeGen/NVPTX/lower-kernel-ptr-arg.ll
A llvm/test/CodeGen/NVPTX/mark-kernel-ptrs-global.ll
Log Message:
-----------
[NVPTX] Refactor NVPTXLowerArgs and move helpers to NVPTXUtilities (#183686)
A couple of refactoring changes to simplify `NVPTXLowerArgs` and reduce
unnecessary coupling to `NVPTXTargetLowering`:
- Move `getFunctionParamOptimizedAlign`, `getFunctionArgumentAlignment`,
and `getFunctionByValParamAlign` from `NVPTXTargetLowering` to
`NVPTXUtilities` as free functions. These don't use any TLI state and
were only member functions because they called each other. This also
lets `getArgumentAlignment` become file-static in
`NVPTXISelLowering.cpp`, and removes the `NVPTXTargetLowering`
dependency from `NVPTXLowerArgs` for byval alignment.
- Split the CUDA kernel pointer-marking logic out of `NVPTXLowerArgs`
into a new `NVPTXMarkKernelPtrsGlobal` pass. This code (marking pointers
loaded from byval params as global, handling int-to-ptr patterns) is
conceptually independent of the argument lowering and was guarded by a
`DrvInterface == CUDA` check that is now at pipeline scheduling time.
The new pass is a simple `FunctionPass` with no `TargetMachine`
dependency.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list