> > So... what's the benefit of this optimization compared to letting the > backend inline the known-trivial dtors? Then we'd get the inlining debug > info for free in (1) (and the non-polymorphic cases of (2)) rather than > having to implement a special-case inlining in Clang. Does this fire in > other cases where LLVM cannot do this? Is there measurable overhead in > emitting trivial derived dtors that simply call their base dtor? >
Piping in a little bit, this also seems to be causing the same warnings with gold as the previous patch. I'm looking to get a small testcase but... -eric > > > > On Mon, Nov 11, 2013 at 8:42 PM, Rafael Espíndola > <[email protected]> wrote: >> >> On 11 November 2013 23:35, David Blaikie <[email protected]> wrote: >> > This optimization fires if the derived dtor has no work to do (and thus >> > without the optimization Clang emits a derived dtor that simply contains >> > a >> > call to the base dtor?)? >> > >> > The usual "What does GCC do?" might be helpful - do they ever do this? >> > Do >> > they do it only > -O0? >> >> They never emit an alias from derived to base (even with local >> classes). With optimizations you get a direct call, but I am not sure >> exactly which optimization is doing it. >> >> Cheers, >> Rafael > > _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
