[flang-commits] [flang] [flang][OpenMP] Adapt OMPMapInfoFinalization to run on all top level ops (PR #93545)

Tom Eccles via flang-commits flang-commits at lists.llvm.org
Tue May 28 07:43:00 PDT 2024


tblah wrote:

Thanks for taking a look!

> However, one question I may have is, will this result in walks on the same MapInfoOp more than once? Might be a dumb question, but I am unfamiliar with addNestedPassToAllTopLevelOperations unfortunately.

It means it will run on other top level operations (currently only `fir.global`, `omp.declare_reduction`, `omp.private`) as well as `func.func`, as though those were also functions. I don't think this should cause the pass to run on the same map operation multiple times.

There's a good argument that this is a waste of time because we won't generate map ops inside of these operations. But I wanted the pass pipeline to be consistent and future proof. I expect that in practice the overhead shouldn't be too bad because only a minority of operations will be outside of `func.func` and MLIR can run the pass on different sibling operations in parallel.

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


More information about the flang-commits mailing list