[LLVMdev] Optimization passes and debug info
Devang Patel
dpatel at apple.com
Tue Jul 8 10:22:14 PDT 2008
On Jul 8, 2008, at 3:33 AM, Matthijs Kooijman wrote:
> 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 envision a three level flag that the transformation passes can use
to make appropriate decision.
Level 1 Preserve all debug info and ability to single step in a
debugger.
If the transformation pass is not able to preserve these then the
pass should skip the transformation.
Level 2 Preserve minimum debug info to help investigate crash reports
from the field (stack traces etc).
Here, it is ok if single stepping capabilities are degraded.
Level 3 Feel free to destroy debug info if it gets in you way.
Here, the pass should not leave misleading debug info in the stream.
If the info can not be fixed as part of transformation then the info
should be just removed.
-
Devang
More information about the llvm-dev
mailing list