[LLVMdev] [cfe-dev][Openmp-dev] Provide LLVM IR and OpenMP LLVM IR as input in a Pass
simone.at at gmail.com
Tue Oct 21 13:52:38 PDT 2014
>> 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 tried it, it does not work and I also talked already with the Polly developers. They are slightly different, for example when the pragmas are translated actually the compiler introduces new functions and Polly get confused.
>> 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.
What I did, and it works, is to build a script that call clang with Polly the first time and write the results in a file, then call Clang again with OpenMP and at the point I can apply other passes on the OpenMP IR reading the Polly results from that file.
But it’s kind of a “dirty" solution, I was wondering if I can, in some way, introduce my own option "-myoption” that compile the code in both ways and make it available to the passes I want to call.
More information about the llvm-dev