Hal Finkel
2014-Oct-21 20:26 UTC
[LLVMdev] [cfe-dev][Openmp-dev] Provide LLVM IR and OpenMP LLVM IR as input in a Pass
----- Original Message -----> From: "Simone Atzeni" <simone.at at gmail.com> > To: llvmdev at cs.uiuc.edu, cfe-dev at cs.uiuc.edu, openmp-dev at dcs-maillist2.engr.illinois.edu > Sent: Tuesday, October 21, 2014 3:17:07 PM > Subject: Re: [LLVMdev] [cfe-dev][Openmp-dev] Provide LLVM IR and OpenMP LLVM IR as input in a Pass > > > > Hi all, > I am going to build a Pass/es that verify OpenMP code. > > > > > When we compile an OpenMP program we give the option “-fopenmp” to > clang. > > > In this way the LLVM IR code obtained will reflect also the “#pragma” > keywords in the code, let’s call it "OpenMP LLVM IR". > > > > > > In my Pass/es before obtaining the OpenMP LLVM IR, I need to do some > operation in the LLVM IR, that is the IR code obtained compiling the > program without the flag “-fopenmp”. > > > > > > So, to be clear my working flow would be: > > > > > > - Run MyPass with in input the LLVM IR > > > - Do some operation on it and get results > > > - Run MyPass again or a different one (MyPass2) with in input the > OpenMP LLVM IR and the results of the previous operations > > > - Do other operations > > > > > > Would it be possible doing something like this? Do you have any idea > how should I proceed? >I think it would be better if you gave us some idea of what you're trying to do. clang's OpenMP implementation turns the OpenMP pragmas into function calls to the runtime library. You can run passes on this IR as you would any other IR. When you say, "Do some operation on it and get results" do you mean generating code, linking and executing that code? -Hal> > > > > I hope this is clear and you can give me some suggestion. > > > > > > Thanks. > > > Best Regards, > Simone > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >-- Hal Finkel Assistant Computational Scientist Leadership Computing Facility Argonne National Laboratory
Simone Atzeni
2014-Oct-21 20:42 UTC
[LLVMdev] [cfe-dev][Openmp-dev] Provide LLVM IR and OpenMP LLVM IR as input in a Pass
Hi Hal, thanks for your answer.> I think it would be better if you gave us some idea of what you're trying to do. clang's OpenMP implementation turns the OpenMP pragmas into function calls to the runtime library. You can run passes on this IR as you would any other IR. When you say, "Do some operation on it and get results" do you mean generating code, linking and executing that code? > > -HalI want to use the pass Polly to find any data dependence in the code. Since it does not work on OpenMP, I was thinking to apply it on the not-OpenMP IR, then I need the results of Polly to apply other passes to the OpenMP IR. That is why I need both. Best, Simone> >> >> >> >> >> I hope this is clear and you can give me some suggestion. >> >> >> >> >> >> Thanks. >> >> >> Best Regards, >> Simone >> >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >> > > -- > Hal Finkel > Assistant Computational Scientist > Leadership Computing Facility > Argonne National Laboratory-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20141021/fe3a953c/attachment.html>
Hal Finkel
2014-Oct-21 20:47 UTC
[LLVMdev] [cfe-dev][Openmp-dev] Provide LLVM IR and OpenMP LLVM IR as input in a Pass
----- Original Message -----> From: "Simone Atzeni" <simone.at at gmail.com> > To: "Hal Finkel" <hfinkel at anl.gov> > Cc: llvmdev at cs.uiuc.edu, cfe-dev at cs.uiuc.edu, openmp-dev at dcs-maillist2.engr.illinois.edu > Sent: Tuesday, October 21, 2014 3:42:03 PM > Subject: Re: [LLVMdev] [cfe-dev][Openmp-dev] Provide LLVM IR and OpenMP LLVM IR as input in a Pass > > > Hi Hal, > > > thanks for your answer. > > > > > I think it would be better if you gave us some idea of what you're > trying to do. clang's OpenMP implementation turns the OpenMP pragmas > into function calls to the runtime library. You can run passes on > this IR as you would any other IR. When you say, "Do some operation > on it and get results" do you mean generating code, linking and > executing that code? > > -Hal > > > > I want to use the pass Polly to find any data dependence in the code. > Since it does not work on OpenMP,Why not? The loops in the outlined OpenMP regions are just regular loops (with runtime bounds). Can polly not handle them?> I was thinking to apply it on the > not-OpenMP IR, then I need the results of Polly to apply other > passes to the OpenMP IR.I don't think this will work for the OpenMP'd loops. The IR will look completely different, be in different functions, etc. -Hal> > > That is why I need both. > > > Best, > Simone > > > > > > > > > > > I hope this is clear and you can give me some suggestion. > > > > > > Thanks. > > > Best Regards, > Simone > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > > > -- > Hal Finkel > Assistant Computational Scientist > Leadership Computing Facility > Argonne National Laboratory >-- Hal Finkel Assistant Computational Scientist Leadership Computing Facility Argonne National Laboratory
Possibly Parallel Threads
- [LLVMdev] [cfe-dev][Openmp-dev] Provide LLVM IR and OpenMP LLVM IR as input in a Pass
- [LLVMdev] [cfe-dev][Openmp-dev] Provide LLVM IR and OpenMP LLVM IR as input in a Pass
- [LLVMdev] [cfe-dev][Openmp-dev] Provide LLVM IR and OpenMP LLVM IR as input in a Pass
- [LLVMdev] [cfe-dev][Openmp-dev] Clang Plugin to analyze OpenMP AST
- [LLVMdev] OpenMP/autopar support in LLVM