[flang-commits] [flang] 6841c43 - [flang] Remove warnings that fast-math options are unimplemented

Tom Eccles via flang-commits flang-commits at lists.llvm.org
Tue Nov 29 09:17:23 PST 2022


Author: Tom Eccles
Date: 2022-11-29T17:15:05Z
New Revision: 6841c43f36ee50c0f87bac8146d16fc4ee0b3ab0

URL: https://github.com/llvm/llvm-project/commit/6841c43f36ee50c0f87bac8146d16fc4ee0b3ab0
DIFF: https://github.com/llvm/llvm-project/commit/6841c43f36ee50c0f87bac8146d16fc4ee0b3ab0.diff

LOG: [flang] Remove warnings that fast-math options are unimplemented

These are now fully implemented, see
https://reviews.llvm.org/D137390
https://reviews.llvm.org/D137391
https://reviews.llvm.org/D137456
https://reviews.llvm.org/D137580
https://reviews.llvm.org/D137602
https://reviews.llvm.org/D138048

These flags are still tested in
flang/test/Driver/frontend-forwarding.f90 and
flang/test/Lower/fast-math-arithmetic.f90

Differential revision: https://reviews.llvm.org/D138907

Added: 
    

Modified: 
    flang/lib/Frontend/CompilerInvocation.cpp

Removed: 
    flang/test/Driver/flang_fp_opts.f90


################################################################################
diff  --git a/flang/lib/Frontend/CompilerInvocation.cpp b/flang/lib/Frontend/CompilerInvocation.cpp
index f0f070eab0135..c065485541c41 100644
--- a/flang/lib/Frontend/CompilerInvocation.cpp
+++ b/flang/lib/Frontend/CompilerInvocation.cpp
@@ -677,8 +677,6 @@ static bool parseFloatingPointArgs(CompilerInvocation &invoc,
                                    llvm::opt::ArgList &args,
                                    clang::DiagnosticsEngine &diags) {
   LangOptions &opts = invoc.getLangOpts();
-  const unsigned diagUnimplemented = diags.getCustomDiagID(
-      clang::DiagnosticsEngine::Warning, "%0 is not currently implemented");
 
   if (const llvm::opt::Arg *a =
           args.getLastArg(clang::driver::options::OPT_ffp_contract)) {
@@ -695,43 +693,36 @@ static bool parseFloatingPointArgs(CompilerInvocation &invoc,
       return false;
     }
 
-    diags.Report(diagUnimplemented) << a->getOption().getName();
     opts.setFPContractMode(fpContractMode);
   }
 
   if (const llvm::opt::Arg *a =
           args.getLastArg(clang::driver::options::OPT_menable_no_infinities)) {
-    diags.Report(diagUnimplemented) << a->getOption().getName();
     opts.NoHonorInfs = true;
   }
 
   if (const llvm::opt::Arg *a =
           args.getLastArg(clang::driver::options::OPT_menable_no_nans)) {
-    diags.Report(diagUnimplemented) << a->getOption().getName();
     opts.NoHonorNaNs = true;
   }
 
   if (const llvm::opt::Arg *a =
           args.getLastArg(clang::driver::options::OPT_fapprox_func)) {
-    diags.Report(diagUnimplemented) << a->getOption().getName();
     opts.ApproxFunc = true;
   }
 
   if (const llvm::opt::Arg *a =
           args.getLastArg(clang::driver::options::OPT_fno_signed_zeros)) {
-    diags.Report(diagUnimplemented) << a->getOption().getName();
     opts.NoSignedZeros = true;
   }
 
   if (const llvm::opt::Arg *a =
           args.getLastArg(clang::driver::options::OPT_mreassociate)) {
-    diags.Report(diagUnimplemented) << a->getOption().getName();
     opts.AssociativeMath = true;
   }
 
   if (const llvm::opt::Arg *a =
           args.getLastArg(clang::driver::options::OPT_freciprocal_math)) {
-    diags.Report(diagUnimplemented) << a->getOption().getName();
     opts.ReciprocalMath = true;
   }
 

diff  --git a/flang/test/Driver/flang_fp_opts.f90 b/flang/test/Driver/flang_fp_opts.f90
deleted file mode 100644
index 0dc31f6f7649e..0000000000000
--- a/flang/test/Driver/flang_fp_opts.f90
+++ /dev/null
@@ -1,18 +0,0 @@
-! Test for handling of floating point options within the frontend driver
-
-! RUN: %flang_fc1 \
-! RUN:      -ffp-contract=fast \
-! RUN:      -menable-no-infs \
-! RUN:      -menable-no-nans \
-! RUN:      -fapprox-func \
-! RUN:      -fno-signed-zeros \
-! RUN:      -mreassociate \
-! RUN:      -freciprocal-math \
-! RUN:      %s 2>&1 | FileCheck %s
-! CHECK: ffp-contract= is not currently implemented
-! CHECK: menable-no-infs is not currently implemented
-! CHECK: menable-no-nans is not currently implemented
-! CHECK: fapprox-func is not currently implemented
-! CHECK: fno-signed-zeros is not currently implemented
-! CHECK: mreassociate is not currently implemented
-! CHECK: freciprocal-math is not currently implemented


        


More information about the flang-commits mailing list