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

Sorry, just seen this ping! The comment is primarily to state that the passes 
should be ran immediately after lowering from parse tree to IR (HLFIR/FIR/OMP), 
as they make a lot of changes to convert things into a more final form for the 
OMP dialect with respect to target. It was previously a lot more important as 
we had a form of outlining that ripped out target regions from their functions 
into seperate functions. That's no longer there, but we do still have some 
passes that modify the IR at this stage to a more finalized form for target, in 
particular OMPMapInfoFinalization which will generate some new maps for 
descriptor types, OMPMarkDeclareTarget which will mark functions declare target 
implicitly, and another that removes functions unnecessary for device. There is 
also a pass or will be for do concurrent which I believe outlines loops into 
target regions as well. 

But TL;DR, there's a lot of things going on in those passes that would be 
preferable to keep happening immediately after lowering from the parse tree so 
later passes can depend on the information being in the "correct" format, 
whether or not that "immediate" location has changed to after this HLFIR 
lowering or remains where it is currently I am unsure of! 

@skatrak @jsjodin may also have some feedback/input to this.

https://github.com/llvm/llvm-project/pull/101446
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to