mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-24 19:56:05 +00:00

Loop index variables are privatised for a worksharing loop. The alloca ops of the privatised index are hoisted to the entry block of the outlineable region or parent function. With HLFIR, the hlfir.declare should be created in the same place as the alloca op. To achieve this the alloc and the hflir.declare should be created in the same place. A new function is created in OpenMP.cpp for this purpose. Reviewed By: tblah Differential Revision: https://reviews.llvm.org/D156719