Hi all, I'm trying to get the llvm's IR from the source code of Polybench (OMP) https://github.com/cavazos-lab/PolyBench-ACC/tree/master/OpenMP. I noticed a considerable difference between the IR generated using clang -emit-llvm -fopenmp and clang -emit-llvm: * using the -fopenmp flag I get a simplified IR in which I read a single basic block where I can highlight a llvm.memcpy function * without -fopenmp flag I get the expected IR in which I find a large number of basic blocks (e.g. for loop --> for.begin, for.end ...) Is there a way to avoid the insertion of llvm.memcpy when I'm using the -fopenmp flag? I've already tried -fno-builtin and -ffreestanding. Thanks, Best Regards, Stefano Corda -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190112/0aea9a4d/attachment.html>
Detection and insertion of llvm.memcpy is done by the LoopIdiom ("-loop-idiom") pass. Currently, there is no way to disable this pass in the pipeline other than using -O0, using opt to rebuild the pass pipeline or editing the LLVM sources. Michael Am Sa., 12. Jan. 2019 um 10:23 Uhr schrieb Corda, S. via llvm-dev <llvm-dev at lists.llvm.org>:> > Hi all, > > I'm trying to get the llvm's IR from the source code of Polybench (OMP) https://github.com/cavazos-lab/PolyBench-ACC/tree/master/OpenMP. > > I noticed a considerable difference between the IR generated using clang -emit-llvm -fopenmp and clang -emit-llvm: > > using the -fopenmp flag I get a simplified IR in which I read a single basic block where I can highlight a llvm.memcpy function > without -fopenmp flag I get the expected IR in which I find a large number of basic blocks (e.g. for loop --> for.begin, for.end ...) > > Is there a way to avoid the insertion of llvm.memcpy when I'm using the -fopenmp flag? > I've already tried -fno-builtin and -ffreestanding. > > Thanks, > Best Regards, > Stefano Corda > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>>>>> On Sun, 13 Jan 2019 19:07:07 -0600, Michael Kruse via llvm-dev <llvm-dev at lists.llvm.org> said:Michael> Detection and insertion of llvm.memcpy is done by the Michael> LoopIdiom ("-loop-idiom") pass. Currently, there is no way Michael> to disable this pass in the pipeline other than using -O0, Michael> using opt to rebuild the pass pipeline or editing the LLVM Michael> sources. We had a similar problem in our SYCL compiler so we added a way to skip the LoopIdiom pass... https://github.com/triSYCL/triSYCL/blob/master/doc/architecture.rst#host-side-compilation-flow https://github.com/triSYCL/clang/commit/16c2fc68cc https://github.com/triSYCL/clang/commit/5508bf637a -- Ronan KERYELL
Maybe Matching Threads
- [LLVMdev] [cfe-dev] libiomp, not libgomp as default library linked with -fopenmp
- [LLVMdev] libiomp, not libgomp as default library linked with -fopenmp
- [LLVMdev] libiomp, not libgomp as default library linked with -fopenmp
- : Trellis plot
- [LLVMdev] libiomp, not libgomp as default library linked with -fopenmp