similar to: [LLVMdev] Getting debug information w/ optimizations

Displaying 20 results from an estimated 30000 matches similar to: "[LLVMdev] Getting debug information w/ optimizations"

2017 Feb 16
2
Can we keep debug information of local variable when in the optimization condition?
Hi, I'm curious that whether we can keep debug information of local variable when in the optimization condition (for example -O2, -O3) in LLVM. For example this simple C source code: int main() { int i = 5; if(i > 5) { return 1; } else { return 0; } } If we compile clang -g a.c, we can get our expected result. We can check and update the local variable
2008 May 02
4
[LLVMdev] Pointer sizes, GetElementPtr, and offset sizes
The LLVA and LLVM papers motivate the GetElementPtr instruction by arguing that it abstracts implementation details, in particular pointer size, from the compiler. While it does this fine for pointer addresses, it does not manage it for address offsets. Consider the following code: $ cat test.c int main() { int *x[2]; int **y = &x[1]; return (y - x); } $ llvm-gcc -O3 -c test.c
2020 Aug 05
2
llc -O2 vs. llc -O3 --> same debug-pass=Executions but output.obj differs?
Hello, I'm trying to minimize the processing time for llc -O3 by using a three step compilation process of 1. llc input.bc -stopafter=targetlibinfo -o input.mir 2. llc -run-pass={....min passes...} input.mir -o opt.mir 3. llc -startafter=machine-opt-remark-emitter -filetype=obj opt.mir -o final.obj Examining the passes produced by llc for O1,O2,O3 I compared (with XXX = {1,2,3}): llc
2019 Oct 13
2
Replicate Individual O3 optimizations
Hello, I want to study the individual O3 optimizations. For this I am using following commands, but unable to replicate O3 behavior. 1. Documents/clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-18.04/bin/clang -O1 -Xclang -disable-llvm-passes -emit-llvm -S vecsum.c -o vecsum-noopt.ll 2. Documents/clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-18.04/bin/clang -O3 -mllvm -debug-pass=Arguments -emit-llvm -S
2008 Jul 21
3
[LLVMdev] Optimization passes and debug info
Hi Chris, > > From this observation, I think it might be useful to have some kind of > > global flag that tells transformations whether it is allowed to remove > > debugging code in favour of optimizations. When we start making > > transformation passes debug-info aware, I think the need for something > > like this might increase. > > I think that the right
2019 Oct 19
3
Replicate Individual O3 optimizations
On Thu, Oct 17, 2019 at 11:22 AM David Greene via llvm-dev < llvm-dev at lists.llvm.org> wrote: > hameeza ahmed via llvm-dev <llvm-dev at lists.llvm.org> writes: > > > Hello, > > I want to study the individual O3 optimizations. For this I am using > > following commands, but unable to replicate O3 behavior. > > > > 1.
2009 Feb 03
0
[LLVMdev] Proposal: Debug information improvement - keep the line number with optimizations
Hi Patel, Thanks for your comments, some reply below... (This is the first part, I'll send the second part later) > 2.1 Verification Flow > > The most important of this project is to make the debug information > > do not block any optimization by LLVM transform passes. Here I > > propose a way to determine whether codegen is being impacted by > > debug info.
2013 Jul 03
1
[LLVMdev] getting source-level debug info
Hello, I have a problem getting source-level debug info using Clang and LLVM 2.9 libraries. I compile the code with -g and -O3 (or even -O1) and I'm receiving the following error: LLVM ERROR: Code generator does not support intrinsic function 'llvm.dbg.value'! make: *** [all] Error 1 Which I found is in IntrinsicLowering.cpp and that's because there isn't any case for
2008 Jul 23
0
[LLVMdev] Optimization passes and debug info
On Jul 21, 2008, at 8:21 AM, Matthijs Kooijman wrote: >> I think that the right answer for llvm-gcc at "-O3 -g" is >> (eventually) >> for debug info to be updated where possible but discarded when >> necessary as you describe. For llvm-gcc we really really want the >> non- >> debug related output of the compiler to be identical between
2019 Oct 24
2
Replicate Individual O3 optimizations
I run matrix multiplication code with both the approaches o3 at clang and o3 at opt. clang o3 is about 2.97x faster than opt o3. On Mon, Oct 21, 2019 at 8:24 AM Neil Nelson <nnelson at infowest.com> wrote: > is_sorted.cpp > bool is_sorted(int *a, int n) { > > for (int i = 0; i < n - 1; i++) > > if (a[i] > a[i + 1]) > return false; > return
2012 Jun 07
3
[LLVMdev] How to use LLVM optimizations with clang
Thanks alot Chad for quick response. Does this means that, we can not use LLVM optimizations except O1, O2, O3, O4 and unroll-loops with clang? One more thing I would like to know that If I want to process multiple modules with opt at the same time like opt -adce *.bc then how is it possible with opt in one go, if I process all the bytecode files within Makefile. Thanks. Shahzad On Thu, Jun
2009 Feb 02
1
[LLVMdev] Proposal: Debug information improvement - keep the line number with optimizations
Hi, I've been thinking about how to keep the line number with the llvm transform/Analysis passes. Basically, I agree with Chris's notes ( http://www.nondot.org/sabre/LLVMNotes/DebugInfoImprovements.txt), and I will follow his way to turn on the line number information when optimization enabled. Here is a detailed proposal: 1. Introduction At the time of this writing, LLVM's
2011 Jan 22
1
[LLVMdev] OPT optimizations
Hi, OPT documentation mentions optimization options -O1,-O2 and -O3 etc. (I am using -O0, no optimizations). The documentation does not tell you what optimizations are included in each option. It says they are same as gcc. gcc dodoc is not of much help either. Where can I find this information. Surinder Kumar Jain
2016 May 17
2
How to debug if LTO generate wrong code?
> On May 17, 2016, at 1:33 AM, Shi, Steven via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > Hello, > Let me ask a LTO simple question again. For the llvm LTO example in the link:http://llvm.org/docs/LinkTimeOptimization.html <http://llvm.org/docs/LinkTimeOptimization.html>, I use below build commands to generate three different optimization level binary: -O0, -O1, -O2.
2012 Jun 08
2
[LLVMdev] How to use LLVM optimizations with clang
Hi, > I tried it with -o - but its producing an error > > gcc: fatal error: cannot specify -o with -c, -S or -E with multiple files > > What you suggest? what I wrote: >> for F in *.c ; do B=`basename $F .c` ; gcc -fplugin=/path/to/dragonegg.so >> -S -o - $F -fplugin-arg-dragonegg-emit-ir | opt -adce -o $B.ll ; done >> clang *.ll Thanks to the for loop and
2012 Jun 08
2
[LLVMdev] How to use LLVM optimizations with clang
Hi, > If I compile the program using the following command line i.e. > > $ clang -O3 -lm *.c this may be doing link time optimization. > > then > > $ time ./a.out > > real 0m2.606s > user 0m2.584s > sys 0m0.012s > > BUT, if I use all the optimizations enabled with -O3 but specify them > explicity i.e. you can just use "opt -O3"
2012 Jun 08
0
[LLVMdev] How to use LLVM optimizations with clang
Thanks Duncan It was really helpful. Regards Abdul On Fri, Jun 8, 2012 at 7:23 PM, Duncan Sands <baldrick at free.fr> wrote: > Hi, > > >> If I compile the program using the following command line i.e. >> >> $ clang -O3 -lm *.c > > > this may be doing link time optimization. > > >> >> then >> >> $ time ./a.out >>
2012 Jun 08
0
[LLVMdev] How to use LLVM optimizations with clang
Hello Duncan Sorry for the mistake. Actually that error occurred when I was compiling all the files at once, NOT in for loop. The for loop is working perfectly as it is dealing with individual files. I have now one new issue. Let me specify it briefly. If I compile the program using the following command line i.e. $ clang -O3 -lm *.c then $ time ./a.out real 0m2.606s user 0m2.584s sys
2013 Nov 27
2
[LLVMdev] Disabling certain optimizations at -O1?
> AFAIU, it's not OK for -g to affect code generation. I agree with the > rest of your plan. That's correct, -g must not affect code generation. This is a fundamental mantra among debug-info people. > > > On Wed, Nov 27, 2013 at 2:16 PM, Renato Golin <renato.golin at linaro.org> > wrote: > > On 27 November 2013 08:43, Evgeniy Stepanov >
2008 Jul 23
3
[LLVMdev] Optimization passes and debug info
Hi Chris, > I just meant -O3 as an example. I'd expect all -O levels to have the > same behavior. -O3 may run passes which are more "lossy" than -O1 > does though, and I'd expect us to put the most effort into making > passes run at -O1 update debug info. I'm not really sure that you could divide passes into "lossy" and "not so lossy"