[cfe-dev] [LLVMdev][Openmp-dev] Provide LLVM IR and OpenMP LLVM IR as input in a Pass

Simone Atzeni simone.at at gmail.com
Tue Sep 30 17:13:47 PDT 2014


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 hope this is clear and you can give me some suggestion.

Thanks.
Best Regards, 
Simone



More information about the cfe-dev mailing list