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

via flang-commits flang-commits at lists.llvm.org
Tue May 28 12:54:43 PDT 2024


agozillon wrote:

> > The only downside I would imagine is it is a lot harder to swap this to a ModuleOp for testing (print/cout testing at least) and debugging, as I imagine it'd run in parallel still like before, just a lot harder to swap to a ModuleOp.
> 
> `fir-opt --omp-map-info-finalization` (which is what the unit test does) will actually run this on the whole module as a single invocation of the pass. (That is why I had the changes at the top of `runOnOperation()`). You can tell fir-opt to construct a pass pipeline for a specific operation type (e.g. func.func), but I don't think any of our unit tests bother doing that. That looks like `fir-opt -pass-pipeline='builtin.module(func.func(omp-map-info-finalization))'`. See documentation at https://mlir.llvm.org/docs/PassManagement/
> 
> In this case it does walk the whole module (instead of going through `addNestedPassToAllTopLevelOperations` as I described above. That works fine for the tests.
> 
> If you want to disable multithreading, use `--mlir-disable-threading`.

Thank you very much for the awesome explanation, that was incredibly informative and I'll be sure to use that going forward :-) there's a lot of command line options and things I still need to learn in general, so that is very helpful. 

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


More information about the flang-commits mailing list