This revision was automatically updated to reflect the committed changes.
Closed by commit rL298877: Encapsulate FPOptions and use it consistently
(authored by anemet).
Changed prior to commit:
https://reviews.llvm.org/D31166?vs=92898&id=93166#toc
Repository:
rL LLVM
https://reviews.llvm.or
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
LGTM!
Comment at: lib/CodeGen/CGExprScalar.cpp:1712
BinOp.Opcode = IsInc ? BO_Add : BO_Sub;
- BinOp.FPContractable = false;
+ // FIXME: once UnaryOperator
anemet updated this revision to Diff 92898.
anemet added a comment.
Address Aaron's comments.
https://reviews.llvm.org/D31166
Files:
include/clang/AST/Expr.h
include/clang/AST/ExprCXX.h
include/clang/Basic/LangOptions.h
include/clang/Sema/Sema.h
lib/AST/ASTImporter.cpp
lib/Analysis/
anemet marked 3 inline comments as done.
anemet added inline comments.
Comment at: lib/CodeGen/CGExprScalar.cpp:1712
BinOp.Opcode = IsInc ? BO_Add : BO_Sub;
- BinOp.FPContractable = false;
+ // FIXME: once UnaryOperator carries FPFeatures, copy it here.
BinOp.E = E;
-
aaron.ballman added inline comments.
Comment at: include/clang/AST/ExprCXX.h:58
+ // Only meaningful for floating point types. For other types this value can
be
// set to false.
+ FPOptions FPFeatures;
Setting a class to false sounds a bit strange. May want
anemet created this revision.
Sema holds the current FPOptions which is adjusted by 'pragma STDC
FP_CONTRACT'. This then gets propagated into expression nodes as they are
built.
This encapsulates FPOptions so that this propagation happens opaquely rather
than directly with the fp_contractable on