[flang-commits] [flang] [flang] Introduce omp_target_allocmem and omp_target_freemem fir ops. (PR #145464)

via flang-commits flang-commits at lists.llvm.org
Fri Jun 27 04:57:50 PDT 2025


skc7 wrote:

@tblah @ergawy This PR is a pre-requisite for workdistribute construct implementation and lowering in flang. 
#140523 introduces "lower-workdistribute" pass which in its implementation, moves fir.allocmem which is inside omp.target region to outside (to host). So, a new op which is called from host, but allocates memory on a given omp device is required. 
So have added it in fir dialect following @ivanradanov coexecute implementation.

I would try to experiment adding this op to openmp mlir dialect as suggested and let you know if it fits this workdistribute implementation.

https://github.com/llvm/llvm-project/pull/145464


More information about the flang-commits mailing list