[PATCH] D31166: Encapsulate FPOptions and use it consistently

2017-03-27 Thread Adam Nemet via Phabricator via cfe-commits
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=93166#toc Repository: rL LLVM

[PATCH] D31166: Encapsulate FPOptions and use it consistently

2017-03-27 Thread Aaron Ballman via Phabricator via cfe-commits
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

[PATCH] D31166: Encapsulate FPOptions and use it consistently

2017-03-23 Thread Adam Nemet via Phabricator via cfe-commits
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

[PATCH] D31166: Encapsulate FPOptions and use it consistently

2017-03-23 Thread Adam Nemet via Phabricator via cfe-commits
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;

[PATCH] D31166: Encapsulate FPOptions and use it consistently

2017-03-23 Thread Aaron Ballman via Phabricator via cfe-commits
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

[PATCH] D31166: Encapsulate FPOptions and use it consistently

2017-03-20 Thread Adam Nemet via Phabricator via cfe-commits
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