[all-commits] [llvm/llvm-project] dbfa69: Port some floating point options to new option mar...

Jan Svoboda via All-commits all-commits at lists.llvm.org
Mon Nov 9 15:00:41 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: dbfa69c5024cfe58b8029a3766ec46c857cddb1e
      https://github.com/llvm/llvm-project/commit/dbfa69c5024cfe58b8029a3766ec46c857cddb1e
  Author: Jan Svoboda <jan_svoboda at apple.com>
  Date:   2020-11-09 (Mon, 09 Nov 2020)

  Changed paths:
    M clang/include/clang/Basic/LangOptions.def
    M clang/include/clang/Driver/Options.td
    M clang/lib/Frontend/CompilerInvocation.cpp
    M clang/unittests/Frontend/CompilerInvocationTest.cpp
    M llvm/include/llvm/Option/OptParser.td
    M llvm/unittests/Option/CMakeLists.txt
    A llvm/unittests/Option/OptionMarshallingTest.cpp
    M llvm/unittests/Option/Opts.td
    M llvm/utils/TableGen/OptParserEmitter.cpp

  Log Message:
  -----------
  Port some floating point options to new option marshalling infrastructure

This ports a number of OpenCL and fast-math flags for floating point
over to the new marshalling infrastructure.

As part of this, `Opt{In,Out}FFlag` were enhanced to allow other flags to
imply them, via `DefaultAnyOf<>`. For example:
```
defm signed_zeros : OptOutFFlag<"signed-zeros", ...,
  "LangOpts->NoSignedZero",
  DefaultAnyOf<[cl_no_signed_zeros, menable_unsafe_fp_math]>>;
```
defines `-fsigned-zeros` (`false`) and `-fno-signed-zeros` (`true`)
linked to the keypath `LangOpts->NoSignedZero`, defaulting to `false`,
but set to `true` implicitly if one of `-cl-no-signed-zeros` or
`-menable-unsafe-fp-math` is on.

Note that the initial patch was written Daniel Grumberg.

Differential Revision: https://reviews.llvm.org/D82756




More information about the All-commits mailing list