[PATCH] Add an -mattr option to the gold plugin to support subtarget features in LTO

Rafael EspĂ­ndola rafael.espindola at gmail.com
Mon Mar 24 16:57:43 PDT 2014


On 24 March 2014 19:27, Tom Roeder <tmroeder at google.com> wrote:
> Hi,
>
> The small patch attached here adds support for an -mattr option to the
> gold plugin and to llvm-lto. This allows the caller to specify details
> of the subtarget architecture, like +aes, or +ssse3 on x86.  Note that
> this required a change to the include/llvm-c/lto.h interface: it adds
> a function lto_codegen_set_attr and it increments the version of the
> interface.
>
> Please let me know what you think.

I am OK with it from gold's point of view.

Dan, my understanding is that you are trying to fix cases like this
with target attributes, so that two functions can be compiled with a
different set of features. Are you ok with this patch as a
short/medium term solution?

Nick, would this API work for ld64 too?

Cheers,
Rafael



More information about the llvm-commits mailing list