spavloff wrote:

`FPOptions` were added to `CompoundStmt` to help code generation for `#pragma 
STDC FENV_ROUND`. If dynamic rounding is used, compiler should emit a code that 
switch it. There is no AST nodes for pragmas, so there is no a good place to 
emit such code. To solve this problem CompoundStmt was allowed to have 
FPOption, although it is not an expression.

This patch is a part of https://github.com/llvm/llvm-project/pull/89617, which 
only sets FPOptions for statements inside a compound statement that do not have 
FPOptions attached.

Now fast-math flags may be attached to SelectInst and PHINode, so at some point 
someone could want to attach FPOptions to, say, IfStmt or any other control 
statement. This solution hopefully could help preventing from adding FPOptions 
to the nodes that are not floating-point operations.

https://github.com/llvm/llvm-project/pull/111654
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to