diff options
author | Cameron McInally <cameron.mcinally@nyu.edu> | 2025-06-10 10:25:33 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-06-10 08:25:33 -0600 |
commit | cde1035a2fc6d472168ce6c6e117f16c76c5bbc4 (patch) | |
tree | 1145714cdff89b512fb29245f8199ce4c84dd1be /flang/lib/Frontend/CompilerInvocation.cpp | |
parent | 326429022ff8c9275c7c49fed095ab1310dabca2 (diff) | |
download | llvm-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.cpp | 4 |
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 : |