[LLVMdev] Optimizations and debug info
dpatel at apple.com
Thu Nov 6 10:49:49 PST 2008
On Nov 3, 2008, at 8:00 AM, Chris Lattner wrote:
> Yes, you need it for correct output, but in practice, we can't provide
> that at high optimization levels. At least we can't do that if we
> preserve the guarantee that turning on debug info should not affect
> the generated executable code.
What we could do is inform the client about the 'damage' done by the
optimizer. If the optimization pass can not preserve debug info. then
it can at least replace llvm.dbg.stoppoint with
llvm.dbg.optimized_away_stoppoint. Now the clients can handle it in
user friendly way appropriately. "Hey, you can not set a break point
here because the optimizer optimized away this expression/statement."
I am just thinking out loud here...
More information about the llvm-dev