[all-commits] [llvm/llvm-project] 8ba880: [Driver] Clean up denormal handling with fast-math...

Andy Kaylor via All-commits all-commits at lists.llvm.org
Mon Apr 29 13:22:30 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8ba880b587074ad6c8624ed45ea2b289f653667f
      https://github.com/llvm/llvm-project/commit/8ba880b587074ad6c8624ed45ea2b289f653667f
  Author: Andy Kaylor <andrew.kaylor at intel.com>
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
    M clang/docs/UsersManual.rst
    M clang/lib/Driver/ToolChain.cpp
    M clang/lib/Driver/ToolChains/Clang.cpp
    M clang/test/Driver/fp-model.c
    M clang/test/Driver/linux-ld.c
    M clang/test/Driver/solaris-ld.c

  Log Message:
  -----------
  [Driver] Clean up denormal handling with fast-math-related options (#89477)

This change cleans up the clang driver handling of umbrella options like
-ffast-math, -funsafe-math-optimizations, and -ffp-model, and aligns the
behavior of -ffp-model=fast with -ffast-math with regard to the linking
of crtfastmath.o.

We agreed in a previous review that the fast-math options should not
attempt to change the -fdenormal-fp-math option, which is inherently
target-specific.

The clang user's manual claims that -ffp-model=fast "behaves identically
to specifying both -ffast-math and -ffp-contract=fast." Since
-ffast-math causes crtfastmath.o to be linked if it is available, that should
also happen with -ffp-model=fast.

I am going to be proposing further changes to -ffp-model=fast,
decoupling it from -ffast-math and introducing a new
-ffp-model=aggressive that matches the current behavior, but I wanted
to solidfy the current behavior before I do that.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list