Files
llvm-project/flang/lib/Optimizer/CodeGen/CodeGenOpenMP.cpp
agozillon a16668a8d7 [Flang][OpenMP][MLIR] Align declare mapper pass handling with other map and global operations (#176852)
This PR makes a couple of minor tweaks to the lowering for
declare_mapper operations:

1) Add declare_mapper operations to the list of global operations to
have optimisation passes
executed on them. Primarily just to make sure we keep it inline with
other global operations
that contain regions. Prevents oddities where we embed FIR/HLFIR into
the mapper that needs
lowered before being converted to LLVM-IR. One example that springs to
mind is if we ever
decide to remove the single block condition on the operation to allow
conditional checks
   for mapped data.
2) Add a CodeGenOpenMP.cpp conversion for DeclareMapperOp to make sure
we convert the return
type correctly from a BoxType to a struct type rather than an opaque
pointer when lowering.
Currently, I've left out the block argument types from being converted
as they're wrapped
   in a fir.ref and would be opauqe pointers in either case.

So some minor additions to keep declare_mapper a little more inline with
the rest of the OpenMP operations.
2026-01-23 22:36:39 +01:00

13 KiB