[flang-commits] [flang] [flang][OpenMP] Allocate `reduction` init temps on the stack for GPUs (PR #146667)
Kiran Chandramohan via flang-commits
flang-commits at lists.llvm.org
Wed Jul 2 04:18:24 PDT 2025
kiranchandramohan wrote:
> This looks okay to me, but you might need to do further work in OpenMPToLLVMIRConversion to be sure these allocas don't end up inlined inside of loops. This is complicated because we don't want to mix allocas and code in general so we can't just inline the init region at the allocaIP.
Fixed length allocas could be hoisted to the function entry but variable length allocas will need stacksave and restore.
https://github.com/llvm/llvm-project/pull/146667
More information about the flang-commits
mailing list