[PATCH] D67839: [FPEnv] Document requirement of function attributes with constrained floating point

Andy Kaylor via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 24 13:49:50 PDT 2019


andrew.w.kaylor added a comment.

It was probably me that argued for the strictfp attribute being required on the function definition. My reasoning was that when the inliner wants to inline a function containing strict FP calls into a function that does not, it would use the strictfp attribute as a cue to convert all of the FP operations in the target function to constrained. This can, of course, be deduced from the IR, but if we treat the attribute on the definition as optional then the inliner would always need to check the IR anyway. So if it isn't required it has limited usefulness.

I agree with Eli that strictfp should provide enough information to prohibit introducing FP instructions that might raise exceptions, and that's probably a better argument for requiring the strictfp attribute on function definitions.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D67839





More information about the llvm-commits mailing list