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

Nick Kledzik kledzik at apple.com
Mon Mar 24 17:11:57 PDT 2014


On Mar 24, 2014, at 4:27 PM, Tom Roeder <tmroeder at google.com> wrote:
> 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.

The LTO API already has:
   lto_codegen_debug_option(lto_codegen_t, const char *);

Could you support -mattr options using the existing API like?:
    lto_codegen_debug_option(cg, “-mattr=+sse3”);

-Nick






More information about the llvm-commits mailing list