techie tawa
2014-Mar-14 10:38 UTC
[LLVMdev] How to detect and work on OpenMP pragmas in llvm /clang
Hi, I'm trying to work on transform passes in LLVM aimed at every OpenMP parallel section which are mentioned using 'omp pragmas'. I'm thinking something like: Module level, Function level and basic block level, can I write any passes at a parallel loop level. If yes, any directions on this would be really helpful. Cheers. chris -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140314/f231ee20/attachment.html>
Hal Finkel
2014-Apr-21 05:00 UTC
[LLVMdev] [cfe-dev] How to detect and work on OpenMP pragmas in llvm /clang
----- Original Message -----> From: "techie tawa" <techie.tawa at gmail.com> > To: "llvmdev" <llvmdev at cs.uiuc.edu>, "cfe-dev" <cfe-dev at cs.uiuc.edu> > Sent: Friday, March 14, 2014 5:38:51 AM > Subject: [cfe-dev] How to detect and work on OpenMP pragmas in llvm /clang > > Hi, > > I'm trying to work on transform passes in LLVM aimed at every OpenMP > parallel section which are mentioned using 'omp pragmas'. > > I'm thinking something like: Module level, Function level and basic > block level, can I write any passes at a parallel loop level. If > yes, any directions on this would be really helpful.Because OpenMP is 'outlined' early -- specifically all pragmas are turned into calls to the runtime library in the frontend -- we don't have any particular infrastructure for this in LLVM. You'd need to run a pass to look at calls to the OpenMP runtime and then go from there. If you can provide further details about what you'd like to accomplish, then I might be able to provide more specific advice. -Hal> > Cheers. > > chris > _______________________________________________ > cfe-dev mailing list > cfe-dev at cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev >-- Hal Finkel Assistant Computational Scientist Leadership Computing Facility Argonne National Laboratory