search for: preopt

Displaying 20 results from an estimated 44 matches for "preopt".

2018 May 15
1
Four bitcode generated with plugin-opt=save-temps
Hi Teresa Thanks for your very quick and clear explanation. I have one more question. The emit-llvm option will give you the IR for a single source file when you compile it with -c. All of those files when combined give the IR in the preopt.bc temp file. =========== So if I use "clang -emit-llvm -c" to generate the .ll file. It should be the same as the one I generated by using "llvm-dis *.preopt.bc -o *.preopt.ll" to translate the bitcode to IR. Actually, I would like to obtain the control flow information from th...
2018 May 15
2
Four bitcode generated with plugin-opt=save-temps
...i I use the LDFLAGS=" -flto -fuse-ld=gold -Wl,-plugin-opt=save-temps " to generate the makefile and to make the whole program. However, found four different kinds of bitcode for each target. For example, I am compiling coreutils. For the program "nohup", I can get nohup.0.0.preopt.bc nohup.0.2.internalize.bc nohup.0.4.opt.bc nohup.0.5.precodegen.bc If I am right, I can also get the bitcode with emit-llvm option in clang. May I know which bc among the above four should be the same as the one I generated with emit-llvm. More information are very thankful. Regards Muhui --...
2018 May 15
0
Four bitcode generated with plugin-opt=save-temps
These are the bitcode at different stages of the LTO portion of the compile. LTO merges the IR for all files being linked and optimizes them as a single monolithic module. The preopt.bc is the merged IR just after merging and before performing any LTO optimizations. internalize.bc is after performing whole program internalization. opt.bc is after the optimization pipeline, and .precodegen.bc is immediately before native code generation. The emit-llvm option will give you the I...
2016 Nov 10
2
Polly | Dependence detection details
Hi everyone, I'll be very thankful if anyone can help me. I want to extract the dependences details by using polly. I followed the following steps on example code matmul.c: 1. clang -S -emit-llvm matmul.c -o matmul.s 2. opt -S -polly-canonicalize matmul.s > matmul.preopt.ll 3. opt -basicaa -polly-dependences -analyze matmul.preopt.ll But it doesn't show me the dependences. I have tried -debug also but still dependces are not shown. I'll be grateful if you can help me. Regards, Qamar -------------- next part -------------- An HTML attachment was scrubb...
2013 Aug 16
2
[LLVMdev] [Polly] Analysis of extra compile-time overhead for simple nested loops
...VM IR code on http://llvm.org/bugs/show_bug.cgi?id=16843 There are four attachments for our C code and LLVM IR code: nestedloop.c (http://llvm.org/bugs/attachment.cgi?id=11043): the simplified C code. nestedloop.ll (http://llvm.org/bugs/attachment.cgi?id=11044): the basic LLVM IR code. nestedloop.preopt.ll (http://llvm.org/bugs/attachment.cgi?id=11045): the preprocessed LLVM IR code. nestedloop.prepare.ll (http://llvm.org/bugs/attachment.cgi?id=11046): the LLVM IR code after running the polly-prepare pass. >> I have investigated the 6X extra compile-time overhead when Polly compiles the si...
2013 Aug 16
0
[LLVMdev] [Polly] Analysis of extra compile-time overhead for simple nested loops
...g/bugs/show_bug.cgi?id=16843 > There are four attachments for our C code and LLVM IR code: > > > nestedloop.c (http://llvm.org/bugs/attachment.cgi?id=11043): the simplified C code. > nestedloop.ll (http://llvm.org/bugs/attachment.cgi?id=11044): the basic LLVM IR code. > nestedloop.preopt.ll (http://llvm.org/bugs/attachment.cgi?id=11045): the preprocessed LLVM IR code. > nestedloop.prepare.ll (http://llvm.org/bugs/attachment.cgi?id=11046): the LLVM IR code after running the polly-prepare pass. Thanks, this works for me. >> # Time with and without preoptimization >>...
2011 Nov 01
0
[LLVMdev] How to make Polly ignore some non-affine memory accesses
...alloc(sizeof(char)*1024*1024); for (i = 1; i < 1024; i++) for (j = 1; j < 1024; j++) { if (i+j > 1000) B[j] = i; } printf("Random Value: %d", B[rand() % 1024*1024]); return 0; } running: opt -load ${PATH_TO_POLLY_LIB}/LLVMPolly.dylib -polly-scops -analyze code.preopt.ll I get: Printing analysis 'Polly - Create polyhedral description of Scops' for region: 'for.body3 => for.inc.single_exit' in function 'main': Invalid Scop! 0 libLLVM-3.1svn.dylib 0x0000000103fab905 _ZL15PrintStackTracePv + 53 1 libLLVM-3.1svn.dylib 0x0000000103fabf7...
2011 Oct 27
2
[LLVMdev] How to make Polly ignore some non-affine memory accesses
Perfect, thank you very much :) 2011/10/26 Tobias Grosser <tobias at grosser.es>: > On 10/24/2011 11:32 PM, Marcello Maggioni wrote: >> >> Strange , with --enable-shared (I use auto tool by the way ...) it gives: >> >> MacBook-Pro-di-Marcello:examples Kariddi$ ./compile_ex.sh >> not_so_simple_loop >> clang (LLVM option parsing): Unknown command line
2011 Oct 07
1
[LLVMdev] How to make Polly ignore some non-affine memory accesses
...       int j, k=10; >          for (j = 1; j < 1024; j++) >                  A[j] = k; > >        return 0; > } > > run with: > > #!/bin/bash > source ../set_path.source > clang -S -emit-llvm $1.c -o $1.s > opt -S -mem2reg -loop-simplify -indvars $1.s > $1.preopt.ll > opt -load ${PATH_TO_POLLY_LIB}/LLVMPolly.so -polly-detect -analyze $1.preopt.ll > > Using the instructions found on the Polly website. > > > 2011/10/7 Tobias Grosser <tobias at grosser.es>: >> On 10/07/2011 03:25 PM, Marcello Maggioni wrote: >>> >>&...
2013 Aug 16
0
[LLVMdev] [Polly] Analysis of extra compile-time overhead for simple nested loops
...$ polly-opt test.ll -targetlibinfo -no-aa -tbaa -basicaa -preverify -domtree -verify -mem2reg -instcombine -simplifycfg -tailcallelim -simplifycfg -reassociate -domtree -loops -loop-simplify -lcssa -loop-rotate -instcombine -scalar-evolution -loop-simplify -lcssa -iv-users -polly-indvars -o out.preopt.ll -S # Show scops with and without preopt ~$ polly-opt -basicaa -view-scops out.preopt.ll -disable-output Writing '/tmp/scops-f3a2fa.dot'... done. Running 'xdot.py' program... done. ~$ polly-opt -basicaa -polly-prepare -view-scops out.preopt.ll -disable-output Writing '/tm...
2018 Jun 03
2
Function start address
Hi Muhui, I tried to grep the "DW_TAG_subprogram" from the debug_info . However, I noticed that the number I found is still less than the whole functions I found with LLVM IR. Do you have any experiences? Many Thanks The only explanation that comes to mind, is that the functions are not in the final binary object file. However, previously you said you believed they were present. If
2011 Oct 08
0
[LLVMdev] How to make Polly ignore some non-affine memory accesses
...j< 1024; j++) >> A[j] = k; >> >> return 0; >> } >> >> run with: >> >> #!/bin/bash >> source ../set_path.source >> clang -S -emit-llvm $1.c -o $1.s >> opt -S -mem2reg -loop-simplify -indvars $1.s> $1.preopt.ll >> opt -load ${PATH_TO_POLLY_LIB}/LLVMPolly.so -polly-detect -analyze $1.preopt.ll >> >> Using the instructions found on the Polly website. There are two reasons why it does not work with these instructions 1. Not the right preoptimization passes The instructions on the Poll...
2013 Aug 17
2
[LLVMdev] [Polly] Analysis of extra compile-time overhead for simple nested loops
...]+=1, X[0]=1 or x=1 printf("%d\n", X[0]); // could be X[0] or x return 0; } Then the scops results would be: $ clang -O0 -emit-llvm -S SingleAcc.c -o SingleAcc.ll # Run everything up to the offending pass $ polly-opt SingleAcc.ll -targetlibinfo -no-aa ... -polly-indvars -o SingleAcc.preopt.ll -S # Print the scop info: $ polly-opt -basicaa -polly-prepare -polly-scops SingleAcc.preopt.ll -analyze (*Note: you can download SingleAcc.preopt.ll on http://llvm.org/bugs/attachment.cgi?id=11059) Printing analysis 'Polly - Create polyhedral description of Scops' for region: 'for...
2018 Jan 29
1
Polly loop offloading to Accelerator
...#include <stdio.h> int a[2048], b[2048], c[2048]; foo () { int i; for (i=0; i<2048; i++) { a[i]=b[5] + c[i]; } } i executed following commands; $clang -S -emit-llvm vec-sum.cpp -march=native -O3 -mllvm -disable-llvm-optzns -o vec-sum.s $opt -S -polly-canonicalize vec-sum.s > vecsum.preopt.ll $opt -polly-ast -polly-ast-detect-parallel -analyze -q vecsum.preopt.ll -polly-process-unprofitable the output is; :: isl ast :: foo :: %1---%8 if (1) #pragma simd #pragma known-parallel for (int c0 = 0; c0 <= 2047; c0 += 1) Stmt0(c0); else { /* original code */ }...
2013 Sep 30
0
[LLVMdev] [Polly] Move Polly's execution later
.... With the help of "-debug-pass=Arguments",  I have reproduced the bug without modify LLVM and Polly. For the attached testcase, it will produce incorrect code if we run a very simple command: $ opt -load LLVMPolly.so -basicaa   -mem2reg  -polly-codegen  -loop-simplify  -print-module foo.preopt.ll The output LLVM IR code would contain a exit basic block that is incorrectly marked as "unreachable". I have updated the bug17323 (http://llvm.org/bugs/show_bug.cgi?id=17323) for the further debugging. Star Tan -------------- next part -------------- An HTML attachment was scrubbed....
2018 Jan 29
2
Polly Dependency Analysis in MyPass
i put following line in CMakeLists.txt; add_subdirectory(mypass) then used make -j9 then i used following and run on canonicalize IR $ opt -load lib/LLVMmypass.so -mypass vec-sum.preopt.ll On Mon, Jan 29, 2018 at 9:39 PM, Michael Kruse <llvmdev at meinersbur.de> wrote: > 2018-01-29 10:18 GMT-06:00 hameeza ahmed <hahmed2305 at gmail.com>: > > I tried writing following code. Could you please help me on this? What to > > modify here? > > Please...
2019 Jan 18
2
Is it possible to generate the IR representation with the original macro information?
...information in the .ll file. Is there a way to preserve the macro information (print() in this case) for debugging purposes? $ clang -std=gnu99 -g3 -flto -Wall -pedantic -c -o main.o main.c $ clang main.o -flto -fuse-ld=gold '-Wl,-plugin-opt=save-temps' -o main.exe $ llvm-dis main.exe.0.0.preopt.bc /* vim: set noexpandtab tabstop=2: */ #include <stdio.h> #define print() puts("Hello World!"); int main() { print(); return 0; } -- Regards, Peng
2011 Oct 03
4
[LLVMdev] How to make Polly ignore some non-affine memory accesses
Hi Tobias, thanks for the answer. I'll try to give a look to the code you pointed me to , and I'll try to make the modification myself. I'm new to LLVM and Polly, but the code of both seem clean and understandable, so I hope to be able to do it myself. In case I'll ask here for support :) Marcello 2011/10/1 Tobias Grosser <tobias at grosser.es>: > On 10/01/2011 03:26
2013 Aug 15
4
[LLVMdev] [Polly] Analysis of extra compile-time overhead for simple nested loops
Hi all, I have investigated the 6X extra compile-time overhead when Polly compiles the simple nestedloop benchmark in LLVM-testsuite. (http://188.40.87.11:8000/db_default/v4/nts/31?compare_to=28&baseline=28). Preliminary results show that such compile-time overhead is resulted by the complicated polly-dependence analysis. However, the key seems to be the polly-prepare pass, which introduces
2013 Oct 03
1
[LLVMdev] [Polly] Move Polly's execution later
...p of "-debug-pass=Arguments", I have reproduced the > bug without modify LLVM and Polly. For the attached testcase, it will produce > incorrect code if we run a very simple command: > $ opt -load LLVMPolly.so -basicaa -mem2reg -polly-codegen -loop-simplify -print-module foo.preopt.ll > > The output LLVM IR code would contain a exit basic block that is incorrectly > marked as "unreachable". > > I have updated the bug17323 (http://llvm.org/bugs/show_bug.cgi?id=17323) > for the further debugging. The problem is that at some point we failt to properl...