================ @@ -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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits