[LLVMdev] Optimization passes and debug info
Luke Dalessandro
luked at cs.rochester.edu
Wed Jul 23 11:04:12 PDT 2008
Hi guys,
>> However, I can imagine that having a -preserve-debugging flag, in
>> addition to
>> the -O levels, would be very much welcome for developers (which
>> would then
>> make goal 2) more important than 1)). Perhaps not so much as an
>> option to
>> llvm-gcc, but even more so when using llvm as a library to create a
>> custom
>> compiler.
>
> Why? Is this is an "optimize as hard as you can without breaking
> debug info" flag? Who would use it (what use case)?
For those of us writing parallel and concurrent code this would be
useful. Races may only manifest themselves under certain conditions that
are triggered by optimized code, and tracking them down is really hard
in the absence of debug information.
If one of the debug info preserving optimizations is the one triggering
the race then having this option would help out. Of course, if it's a
destructive optimization then we are out of luck, but one can always hope.
As a side note, I'm talking about both races introduced by reordering
optimizations due to missing fences, and races that always exist but
occur much more frequently because of the increase in speed in the
optimized code.
Luke
More information about the llvm-dev
mailing list