[clang] [llvm] [NVPTX] Change the alloca address space in NVPTXLowerAlloca (PR #154814)
Artem Belevich via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 28 10:13:39 PDT 2025
================
@@ -368,8 +354,17 @@ void NVPTXPassConfig::addIRPasses() {
// NVPTXLowerArgs is required for correctness and should be run right
// before the address space inference passes.
addPass(createNVPTXLowerArgsPass());
+
+ if (getOptLevel() != CodeGenOptLevel::None)
+ // NVPTXLowerArgs emits alloca for byval parameters which can often
----------------
Artem-B wrote:
Nit: "may emit". We do make an effort not to make copies of byval argument, if we can prove that it's safe.
https://github.com/llvm/llvm-project/pull/154814
More information about the cfe-commits
mailing list