[PATCH] D142907: LangRef: Add "dynamic" option to "denormal-fp-math"
Eli Friedman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 21 11:49:38 PDT 2023
efriedma added a comment.
I'm having trouble understanding the changes on the clang side.
If I'm following correctly; the "denormal-fp-math" setting is a promise from the user to the compiler: if the setting is not "dynamic", the user promises that the definition will only execute in the specified denormal mode. This is similar to, for example, the rounding mode pragmas: the user promises a specific rounding mode unless they explicitly request dynamic rounding.
Given that, I don't follow the whole "merging" thing... we should just be setting whatever mode is active. The attribute setting should not depend on whether the function is interposable. If you have a ODR function, all definitions must have a mode compatible with whatever mode will be used at runtime. If you have a non-ODR weak function, optimizations shouldn't propagate that mode from the callee to the caller.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142907/new/
https://reviews.llvm.org/D142907
More information about the cfe-commits
mailing list