[LLVMbugs] [Bug 2083] Optimisation breaks debug records: region.start/region.end

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Tue Feb 26 22:21:02 PST 2008


Chris Lattner <sabre at nondot.org> changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID

--- Comment #12 from Chris Lattner <sabre at nondot.org>  2008-02-27 00:21:01 ---
> There is the comment on this bug "Optimization of the code with debug
> information currently is not supported at all". llvm-gcc will disable debugging
> if  -g and -O are specified simultaneously but we have been creating
> semi-optimised and debuggable code by: (a) passing -O0 to llvm-gcc; (b) passing
> the resultant bitcode file through opt; (c) passing optimisation flags to
> llvm-ld when linking. Is this recommended practice, or would it be more
> appropriate at this stage in the llvm development to ensure that optimisation
> and debugging are never used simultaneously?

The basic issue is that turning on debug info will cause severe code
pessimization, and some people build with "-O2 -g" regularly. For llvm-gcc we
can't take the risk that someone will do this, measure performance, then go
away saying "llvm generates crappy code" :).

Clients of the debug info should be able to grok arbitrarily modified debug
intrinsics though, so the optimizers should all be safe.  Unnesting is
something that your debug consumer will have to deal with, sorry! :(

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list