diff options
author | Tom Roeder <tmroeder@google.com> | 2014-04-25 21:46:51 +0000 |
---|---|---|
committer | Tom Roeder <tmroeder@google.com> | 2014-04-25 21:46:51 +0000 |
commit | 817f5e2fa137b15b536c952bcc1e75b1dd34b4b1 (patch) | |
tree | f514566a78e689fcc0c138b83fde6342a4c26c9a /include/llvm-c | |
parent | c744a371534456c1bb6557f053705f066ac33b62 (diff) | |
download | llvm-817f5e2fa137b15b536c952bcc1e75b1dd34b4b1.tar.gz llvm-817f5e2fa137b15b536c952bcc1e75b1dd34b4b1.tar.bz2 llvm-817f5e2fa137b15b536c952bcc1e75b1dd34b4b1.tar.xz |
Add an -mattr option to the gold plugin to support subtarget features in LTO
This 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 requires 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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207279 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm-c')
-rw-r--r-- | include/llvm-c/lto.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/llvm-c/lto.h b/include/llvm-c/lto.h index 808de03318..9c2061acd6 100644 --- a/include/llvm-c/lto.h +++ b/include/llvm-c/lto.h @@ -40,7 +40,7 @@ typedef bool lto_bool_t; * @{ */ -#define LTO_API_VERSION 10 +#define LTO_API_VERSION 11 /** * \since prior to LTO_API_VERSION=3 @@ -375,6 +375,14 @@ lto_codegen_set_pic_model(lto_code_gen_t cg, lto_codegen_model); extern void lto_codegen_set_cpu(lto_code_gen_t cg, const char *cpu); +/** + * Sets attributes for the cpu to generate code for. + * + * \since LTO_API_VERSION=11 + */ +extern void +lto_codegen_set_attr(lto_code_gen_t cg, const char *attr); + /** * Sets the location of the assembler tool to run. If not set, libLTO |