[PATCH] D69272: Restricted variant of '#pragma STDC FENV_ACCESS'
Kevin P. Neal via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 20 08:09:09 PST 2019
kpn added a comment.
In D69272#1792856 <https://reviews.llvm.org/D69272#1792856>, @mibintc wrote:
> In D69272#1717021 <https://reviews.llvm.org/D69272#1717021>, @kpn wrote:
>
> > Is there a way forward to support having the #pragma at the start of any block inside a function? The effect won't be restricted to that block, true, but the standard does say the #pragma is allowed.
>
>
> Please clarify: I understand that the backend wants all floating point operations to be built using Floating Point Constrained Intrinsics if any operations use constrained intrinsic. But I thought that, if the constraint were only to apply to a block within the function, that the operations outside the block would be written with the default setting for rounding mode and exception behavior, and the operations inside the constrained block would be created with different settings. Like this
Your understanding is correct.
My understanding of this patch is that it only allows the #pragma at the top of each function. It doesn't allow it in blocks inside the function. So if a function has a block inside it that uses strict FP the patch doesn't change the rest of the function to use constrained FP with the settings like you said. And my question was asking if there was a way forward with this patch to a full implementation.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69272/new/
https://reviews.llvm.org/D69272
More information about the cfe-commits
mailing list