[PATCH] D80462: Fix floating point math function attributes definition.

Michele Scandale via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 5 16:16:12 PDT 2020


michele.scandale added a comment.

In D80462#2077569 <https://reviews.llvm.org/D80462#2077569>, @rjmccall wrote:

> Can we do this conservatively only if something is changed within the function definition, and otherwise respect the global settings?


I'm not sure I understand what you mean. The initial state is already the global settings coming from the language options (see constructor of `CodeGenFunction`).
Then whenever we process a unary/binary floating point operator we consider the local FPOptions and adjust the values of the function attributes accordingly.

Maybe instead of having an explicit state (the booleans) in `CodeGenFunction` tracking the values for these function attributes, I could simply update the function attributes directly. I guess the extra cost is negligible.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80462





More information about the cfe-commits mailing list