Encapsulate FPOptions and use it consistently
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/off bit. This allows controlled transitioning of fp_contractable to a ternary value (off, on, fast). It will also allow adding more fast-math flags later. This is toward moving fp-contraction=fast from an LLVM TargetOption to a FastMathFlag in order to fix PR25721. Differential Revision: https://reviews.llvm.org/D31166 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298877 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- include/clang/AST/Expr.h 15 additions, 13 deletionsinclude/clang/AST/Expr.h
- include/clang/AST/ExprCXX.h 8 additions, 8 deletionsinclude/clang/AST/ExprCXX.h
- include/clang/Basic/LangOptions.h 14 additions, 4 deletionsinclude/clang/Basic/LangOptions.h
- include/clang/Sema/Sema.h 4 additions, 6 deletionsinclude/clang/Sema/Sema.h
- lib/AST/ASTImporter.cpp 2 additions, 2 deletionslib/AST/ASTImporter.cpp
- lib/Analysis/BodyFarm.cpp 2 additions, 2 deletionslib/Analysis/BodyFarm.cpp
- lib/CodeGen/CGExprScalar.cpp 6 additions, 6 deletionslib/CodeGen/CGExprScalar.cpp
- lib/CodeGen/CGObjC.cpp 2 additions, 2 deletionslib/CodeGen/CGObjC.cpp
- lib/CodeGen/CGStmtOpenMP.cpp 1 addition, 2 deletionslib/CodeGen/CGStmtOpenMP.cpp
- lib/Frontend/Rewrite/RewriteModernObjC.cpp 1 addition, 1 deletionlib/Frontend/Rewrite/RewriteModernObjC.cpp
- lib/Frontend/Rewrite/RewriteObjC.cpp 1 addition, 1 deletionlib/Frontend/Rewrite/RewriteObjC.cpp
- lib/Sema/SemaAttr.cpp 3 additions, 3 deletionslib/Sema/SemaAttr.cpp
- lib/Sema/SemaDeclCXX.cpp 1 addition, 1 deletionlib/Sema/SemaDeclCXX.cpp
- lib/Sema/SemaExpr.cpp 2 additions, 2 deletionslib/Sema/SemaExpr.cpp
- lib/Sema/SemaExprCXX.cpp 1 addition, 1 deletionlib/Sema/SemaExprCXX.cpp
- lib/Sema/SemaOverload.cpp 10 additions, 10 deletionslib/Sema/SemaOverload.cpp
- lib/Sema/SemaPseudoObject.cpp 8 additions, 5 deletionslib/Sema/SemaPseudoObject.cpp
- lib/Sema/TreeTransform.h 2 additions, 2 deletionslib/Sema/TreeTransform.h
- lib/Serialization/ASTReader.cpp 1 addition, 1 deletionlib/Serialization/ASTReader.cpp
- lib/Serialization/ASTReaderStmt.cpp 2 additions, 2 deletionslib/Serialization/ASTReaderStmt.cpp
Loading
Please register or sign in to comment