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 | fd1bc602b31c2acdd8cba6be835b9bba5d424af6 (patch) | |
tree | 67acfd8a53f1e0d86e8bc658bbefcb661ae98838 /llvm/lib/LTO | |
parent | b54d0f4020de4d6d8c17f1d353a924b570b20a15 (diff) | |
download | bcm5719-llvm-fd1bc602b31c2acdd8cba6be835b9bba5d424af6.tar.gz bcm5719-llvm-fd1bc602b31c2acdd8cba6be835b9bba5d424af6.zip |
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.
llvm-svn: 207279
Diffstat (limited to 'llvm/lib/LTO')
-rw-r--r-- | llvm/lib/LTO/LTOCodeGenerator.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/LTO/LTOCodeGenerator.cpp b/llvm/lib/LTO/LTOCodeGenerator.cpp index da74c57c589..105fb6900db 100644 --- a/llvm/lib/LTO/LTOCodeGenerator.cpp +++ b/llvm/lib/LTO/LTOCodeGenerator.cpp @@ -301,8 +301,9 @@ bool LTOCodeGenerator::determineTarget(std::string &errMsg) { break; } - // construct LTOModule, hand over ownership of module and target - SubtargetFeatures Features; + // Construct LTOModule, hand over ownership of module and target. Use MAttr as + // the default set of features. + SubtargetFeatures Features(MAttr); Features.getDefaultSubtargetFeatures(Triple); std::string FeatureStr = Features.getString(); // Set a default CPU for Darwin triples. |