aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorCameron McInally <cameron.mcinally@nyu.edu>2025-06-10 10:25:33 -0400
committerGitHub <noreply@github.com>2025-06-10 08:25:33 -0600
commitcde1035a2fc6d472168ce6c6e117f16c76c5bbc4 (patch)
tree1145714cdff89b512fb29245f8199ce4c84dd1be /flang/lib/Frontend/CompilerInvocation.cpp
parent326429022ff8c9275c7c49fed095ab1310dabca2 (diff)
downloadllvm-cde1035a2fc6d472168ce6c6e117f16c76c5bbc4.zip
llvm-cde1035a2fc6d472168ce6c6e117f16c76c5bbc4.tar.gz
llvm-cde1035a2fc6d472168ce6c6e117f16c76c5bbc4.tar.bz2
[flang] Add support for -mrecip[=<list>] (#143418)
This patch adds support for the -mrecip command line option. The parsing of this options is equivalent to Clang's and it is implemented by setting the "reciprocal-estimates" function attribute. Also move the ParseMRecip(...) function to CommonArgs, so that Flang is able to make use of it as well. --------- Co-authored-by: Cameron McInally <cmcinally@nvidia.com>
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--flang/lib/Frontend/CompilerInvocation.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/flang/lib/Frontend/CompilerInvocation.cpp b/flang/lib/Frontend/CompilerInvocation.cpp
index 5e156b4..15bcff2 100644
--- a/flang/lib/Frontend/CompilerInvocation.cpp
+++ b/flang/lib/Frontend/CompilerInvocation.cpp
@@ -307,8 +307,10 @@ static void parseCodeGenArgs(Fortran::frontend::CodeGenOptions &opts,
for (auto *a : args.filtered(clang::driver::options::OPT_fpass_plugin_EQ))
opts.LLVMPassPlugins.push_back(a->getValue());
+ opts.Reciprocals = clang::driver::tools::parseMRecipOption(diags, args);
+
opts.PreferVectorWidth =
- clang::driver::tools::ParseMPreferVectorWidthOption(diags, args);
+ clang::driver::tools::parseMPreferVectorWidthOption(diags, args);
// -fembed-offload-object option
for (auto *a :