diff options
author | Craig Topper <craig.topper@intel.com> | 2017-11-20 17:09:22 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@intel.com> | 2017-11-20 17:09:22 +0000 |
commit | 402b431051e7cda063f38324c191d38096082c64 (patch) | |
tree | 7936aa18199869fc0d8ccafeb3579134663f9dfb /clang/lib | |
parent | f75f4d65730cef5646ac7472354e71f7df528df7 (diff) | |
download | bcm5719-llvm-402b431051e7cda063f38324c191d38096082c64.tar.gz bcm5719-llvm-402b431051e7cda063f38324c191d38096082c64.zip |
[CodeGen] Move Reciprocals option from TargetOptions to CodeGenOptions
Diffrential Revision: https://reviews.llvm.org/D40226
llvm-svn: 318662
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/CodeGen/CGCall.cpp | 2 | ||||
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp index cefd73be276..08f514f94d5 100644 --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/lib/CodeGen/CGCall.cpp @@ -1739,7 +1739,7 @@ void CodeGenModule::ConstructDefaultFnAttrList(StringRef Name, bool HasOptnone, llvm::toStringRef(CodeGenOpts.CorrectlyRoundedDivSqrt)); // TODO: Reciprocal estimate codegen options should apply to instructions? - std::vector<std::string> &Recips = getTarget().getTargetOpts().Reciprocals; + const std::vector<std::string> &Recips = CodeGenOpts.Reciprocals; if (!Recips.empty()) FuncAttrs.addAttribute("reciprocal-estimates", llvm::join(Recips, ",")); diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 477daad0b99..384124bee2b 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -642,6 +642,7 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK, Opts.FlushDenorm = Args.hasArg(OPT_cl_denorms_are_zero); Opts.CorrectlyRoundedDivSqrt = Args.hasArg(OPT_cl_fp32_correctly_rounded_divide_sqrt); + Opts.Reciprocals = Args.getAllArgValues(OPT_mrecip_EQ); Opts.ReciprocalMath = Args.hasArg(OPT_freciprocal_math); Opts.NoTrappingMath = Args.hasArg(OPT_fno_trapping_math); Opts.NoZeroInitializedInBSS = Args.hasArg(OPT_mno_zero_initialized_in_bss); @@ -2667,7 +2668,6 @@ static void ParseTargetArgs(TargetOptions &Opts, ArgList &Args, Opts.FeaturesAsWritten = Args.getAllArgValues(OPT_target_feature); Opts.LinkerVersion = Args.getLastArgValue(OPT_target_linker_version); Opts.Triple = llvm::Triple::normalize(Args.getLastArgValue(OPT_triple)); - Opts.Reciprocals = Args.getAllArgValues(OPT_mrecip_EQ); // Use the default target triple if unspecified. if (Opts.Triple.empty()) Opts.Triple = llvm::sys::getDefaultTargetTriple(); |