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

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 13 19:33:12 PST 2017


mehdi_amini added a comment.

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.


https://reviews.llvm.org/D28075





More information about the llvm-commits mailing list