[PATCH] D28075: MergeFunctions: Preserve debug info in thunks, under option -mergefunc-preserve-debug-info

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 20 13:39:18 PST 2017


aprantl added a comment.

In https://reviews.llvm.org/D28075#646233, @mehdi_amini wrote:

> In https://reviews.llvm.org/D28075#646196, @appcs wrote:
>
> > In https://reviews.llvm.org/D28075#645429, @aprantl wrote:
> >
> > > There are several options I could think of:
> > >  Either surfacing it through a driver option, enabling it at -Og, or benchmarking it and arguing to enable it by default at some optimization settings.
> >
> >
> > -Og?
>
>
> Og is the new optimization level which is "optimize while preserving the best debug experience"
>
> > I feel that -g ought to imply -mergefunc-preserve-debug-info - would you agree?
>
> I don't see in this patch how is it supposed to trigger as I don't see an API to enable/disable this behavior (mergefunc-preserve-debug-info).
>  Also we need to think about LTO (which is likely a very good candidate for mergefunc, so should be considered high priority), and so embed this as a function attribute of some sort.


@mehdi_amini, is this something you would like to see in this patch before it is committed, or in a follow-up patch?


https://reviews.llvm.org/D28075





More information about the llvm-commits mailing list