[PATCH] Pass -mglobal-merge as a module flag metadata.

Akira Hatanaka ahatanak at gmail.com
Mon Mar 16 08:27:42 PDT 2015


On Fri, Mar 13, 2015 at 4:09 PM, Eric Christopher <echristo at gmail.com>
wrote:

> No, you probably haven't. I was seeing it as clang doing to lto link of
> the module together and then codegen based on that (which means it would
> have the options), but...
>
> That said, I think the general problem is more specific. I.e. how do you
> specify -msse3 as part of the default code generation flags when you do lto?
>
>
In LTOCodeGenerator.cpp, SubtargetFeatures::getDefaultSubtargetFeatures is
called to get the default subtarget features and the string is passed to
TargetCreateTargetMachine.

Is that what you are asking about?


> The C++ interface has addAttr (which is painful in that it requires, as
> you say, every linker to understand llvm's command line interface), but
> this is also pretty painful:
>
>   const void *compile(size_t *length,
>                       bool disableOpt,
>                       bool disableInline,
>                       bool disableGVNLoadPRE,
>                       bool disableVectorization,
>                       std::string &errMsg);
>
> because, you know, all optimizations, inlining, gvnloadpre, and
> vectorization are all anyone care about :)
>
> Realize this has dovetailed into "let's solve the general problem" but I
> am curious. The gold plugin's methods aren't much better.
>
> Or am I missing something?
>
> -eric
>
>
> http://reviews.llvm.org/D7968
>
> EMAIL PREFERENCES
>   http://reviews.llvm.org/settings/panel/emailpreferences/
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150316/e2e820b4/attachment.html>


More information about the cfe-commits mailing list