[llvm-branch-commits] [flang] [flang] Lower omp.workshare to other omp constructs (PR #101446)

Tom Eccles via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Aug 1 03:34:55 PDT 2024


================
@@ -344,6 +345,7 @@ inline void createHLFIRToFIRPassPipeline(
   pm.addPass(hlfir::createLowerHLFIRIntrinsics());
   pm.addPass(hlfir::createBufferizeHLFIR());
   pm.addPass(hlfir::createConvertHLFIRtoFIR());
+  pm.addPass(flangomp::createLowerWorkshare());
----------------
tblah wrote:

The other OpenMP passes are added in `createOpenMPFIRPassPipeline`, which is only called when `-fopenmp` is used. It would be convenient if this new pass could stay with the other OpenMP passes.

Currently those passes are run immediately after lowering. There are comments which say they have to be run immediately after lowering, but at a glance it isn't obvious why they couldn't be run here after HLFIR. @agozillon what do  you think?

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


More information about the llvm-branch-commits mailing list