[PATCH] D80952: [FPEnv][Clang][Driver][WIP] Disable constrained floating point on targets lacking support.

Kevin P. Neal via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 2 06:36:36 PDT 2020


kpn added a comment.

In D80952#2067643 <https://reviews.llvm.org/D80952#2067643>, @arsenm wrote:

> In D80952#2067563 <https://reviews.llvm.org/D80952#2067563>, @efriedma wrote:
>
> > The problem for the command-line arguments in particular is that they aren't really new; clang has been eating them for a long time, without any warning.  So if -frounding-math crashes the compiler, that's a regression.
>
>
> Could we get an -fexperimental-something flag to override this behavior then?


The vast majority of the work needed is in llvm and not clang. Most if not all testing is done with the llc executable. There is some work in clang's CGBuiltins.cpp, but that's pretty small compared to llvm. And with this patch the enabling of the clang support is only one line. That seems cheaper than yet another command line flag. Someone doing development of the clang parts is going to be building clang anyway so I don't see how a one line change is much of a burden.

The flags for strict fp and rounding are already pretty complicated already. I'd hate to make it even worse with yet another flag just to avoid having a developer have to carry one line in one source file. And when clang+llvm is ready for a target that one line would be needed _anyway_. So what would a new -fexperimental-something flag gain us?

Also, I'm not sure that the constrained intrinsics will ever be implemented on every last one of our targets. So a new flag would complicate matters basically forever.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80952/new/

https://reviews.llvm.org/D80952





More information about the cfe-commits mailing list