On Wed, 5 Sep 2012, Matthew Gretton-Dann wrote: > On 5 September 2012 09:55, Steven Bosscher <stevenb....@gmail.com> wrote: > > On Wed, Sep 5, 2012 at 10:46 AM, Matthew Gretton-Dann > > <matthew.gretton-d...@linaro.org> wrote: > >>> Please, no inlining. Think of stack back-traces and their use > >>> when debugging. > >> > >> I would argue [without sufficient knowledge of how easy this would > >> actually be to do in a real compiler :-)] that this is a debugger > >> problem and not a compiler issue. > > > > It's also a compiler issue if you take inlining of clones into > > account, or scheduling such that the inlined body is scattered all > > over in the the caller's body. The compiler can tell the debugger > > only so much... > > But that's not a problem with inlining, that's a problem with allowing > things to happen out of order (for some definition of things and > order) - which in my understanding -Og is going to tie down.
Yes, the goal is definitely to avoid the jumping back and forth on source lines you can see when debugging optimized programs. Btw, the patch only lies the foundation for all the goals that accumulated in this thread to be eventually fulfilled. I only tried to collect the minimal set of optimizations that do not automatically defeat any of them ;) Any comments on the implementation details btw? Thanks, Richard.