diff options
author | Daniel Jasper <djasper@google.com> | 2015-03-23 05:52:28 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2015-03-23 05:52:28 +0000 |
commit | 2cda1f6f19fb4fbe758a9e9f752aa9dbe3ab469c (patch) | |
tree | 3d1fc9a275305d39453280796c590c9a4bc12605 /lib/CodeGen/CGCall.cpp | |
parent | 83f91e7ef88b5f64bdbf6221ce7132b399de0e17 (diff) |
Revert "Add CodeGen support for adding cpu attributes on functions based on"
This breaks CodeGen for an internal target. I'll get repro instructions
to you.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@232930 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCall.cpp')
-rw-r--r-- | lib/CodeGen/CGCall.cpp | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp index 4b4fa7cd78..3cb72bd151 100644 --- a/lib/CodeGen/CGCall.cpp +++ b/lib/CodeGen/CGCall.cpp @@ -31,7 +31,6 @@ #include "llvm/IR/InlineAsm.h" #include "llvm/IR/Intrinsics.h" #include "llvm/Transforms/Utils/Local.h" -#include <sstream> using namespace clang; using namespace CodeGen; @@ -1476,26 +1475,6 @@ void CodeGenModule::ConstructAttributeList(const CGFunctionInfo &FI, if (!CodeGenOpts.StackRealignment) FuncAttrs.addAttribute("no-realign-stack"); - - // Add target-cpu and target-features work if they differ from the defaults. - std::string &CPU = getTarget().getTargetOpts().CPU; - if (CPU != "" && CPU != getTarget().getTriple().getArchName()) - FuncAttrs.addAttribute("target-cpu", getTarget().getTargetOpts().CPU); - - // TODO: FeaturesAsWritten gets us the features on the command line, - // for canonicalization purposes we might want to avoid putting features - // in the target-features set if we know it'll be one of the default - // features in the backend, e.g. corei7-avx and +avx. - std::vector<std::string> &Features = - getTarget().getTargetOpts().FeaturesAsWritten; - if (!Features.empty()) { - std::stringstream S; - std::copy(Features.begin(), Features.end(), - std::ostream_iterator<std::string>(S, ",")); - // The drop_back gets rid of the trailing space. - FuncAttrs.addAttribute("target-features", - StringRef(S.str()).drop_back(1)); - } } ClangToLLVMArgMapping IRFunctionArgs(getContext(), FI); |