[PATCH] D70261: [strictfp] Add token support for FP constraints

Ulrich Weigand via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 15 08:27:20 PST 2019


uweigand added a comment.

In D70261#1747641 <https://reviews.llvm.org/D70261#1747641>, @simoll wrote:

> Quoting: https://llvm.org/docs/LangRef.html#token-type
>
> > "The token type is used when a value is associated with an instruction but all uses of the value **must not attempt to introspect or obscure it**. As such, it is not appropriate to have a phi or select of type token."
>
> That seems to be a pretty accurate description of how the fpround/fpexcept params are supposed to be handled (they must not change the operation/implementation of the constrained fp op).


Maybe I'm just interpreting this differently, but for me this reads as a description of the **token value** itself, which is something opaque that the compiler must not attempt to modify (as in the current use of tokens with Windows exception handling, where the token values generated by the OS apparently interact with exception control flow in a non-obvious way).

This is really a different scenario from constrained fp ops, where the fpround/fpexcept params are not so much operands, but just compile-time constants associated with an instruction -- in a sense, more like "extended opcodes" (similar to fast-math flags or the like).


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

https://reviews.llvm.org/D70261





More information about the llvm-commits mailing list