[LLVMdev] Optimization passes and debug info

Chris Lattner clattner at apple.com
Wed Jul 23 10:52:09 PDT 2008


On Jul 23, 2008, at 10:44 AM, Devang Patel wrote:
>> 2. Based on #1, it is preferable for all optimizations to update  
>> debug
>> info.  This improves the QoI of the debugging experience when the
>> optimizations are enabled.  However, based on #1, if they can't or
>> haven't been updated yet, they should just discard it.
>
> What about possibility of skipping the optimization if it can not
> update debug info successfully ?

In my opinion, for llvm-gcc, this would be extremely bad.  Enabling -g  
should not affect the machine code generated by the compiler.  One  
reason why: compiler bugs do happen, and some users like enabling -g  
to try to understand what the optimizer is doing and find the bug.  If  
enabling -g changes the code being generated, this can't work.

-Chris




More information about the llvm-dev mailing list