[PATCH] D81869: Modify FPFeatures to use delta not absolute settings to solve PCH compatibility problems
Melanie Blower via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 15 13:14:21 PDT 2020
mibintc created this revision.
mibintc added a reviewer: rjmccall.
Herald added subscribers: llvm-commits, dexonsmith.
Herald added projects: clang, LLVM.
mibintc marked an inline comment as done.
mibintc added a comment.
@rjmccall You suggested that the FPFeatures could be delta instead of absolute settings, I think this is approximately what you mean. This is a rough patch employing that idea, would welcome your early comments. There are 2 clang tests that are failing with this patch, I need to dig into those.
Failed Tests (2):
Clang :: CodeGen/fp-floatcontrol-stack.cpp
Clang :: PCH/pragma-floatcontrol.c
================
Comment at: llvm/include/llvm/ADT/FloatingPointMode.h:43
// Special values.
+ Unset = 6, ///< Denotes an unset value, (for clang, must fit in 3 bits)
Dynamic = 7, ///< Denotes mode unknown at compile time.
----------------
I added "unset" enumerals to the 3 enumeration values. Note that I can't just use the "invalid" enumeration since the clang field is only 3 bits wide so Invalid would appear to equal Dynamic
(This patch is in development)
To solve https://bugs.llvm.org/show_bug.cgi?id=46166 where the floating point settings in PCH files aren't compatible, rewrite FPFeatures to use a delta in the settings rather than absolute settings
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D81869
Files:
clang/include/clang/AST/Expr.h
clang/include/clang/AST/ExprCXX.h
clang/include/clang/AST/Stmt.h
clang/include/clang/Basic/LangOptions.h
clang/include/clang/Sema/Sema.h
clang/include/clang/Serialization/ASTWriter.h
clang/lib/AST/Expr.cpp
clang/lib/AST/ExprCXX.cpp
clang/lib/Analysis/BodyFarm.cpp
clang/lib/Basic/LangOptions.cpp
clang/lib/CodeGen/BackendUtil.cpp
clang/lib/CodeGen/CGExprScalar.cpp
clang/lib/CodeGen/CGObjC.cpp
clang/lib/CodeGen/CGStmtOpenMP.cpp
clang/lib/CodeGen/CodeGenFunction.cpp
clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp
clang/lib/Frontend/Rewrite/RewriteObjC.cpp
clang/lib/Parse/ParsePragma.cpp
clang/lib/Sema/Sema.cpp
clang/lib/Sema/SemaAttr.cpp
clang/lib/Sema/SemaDeclCXX.cpp
clang/lib/Sema/SemaExpr.cpp
clang/lib/Sema/SemaExprObjC.cpp
clang/lib/Sema/SemaOverload.cpp
clang/lib/Sema/SemaPseudoObject.cpp
clang/lib/Sema/TreeTransform.h
clang/lib/Serialization/ASTReader.cpp
clang/lib/Serialization/ASTReaderStmt.cpp
clang/lib/Serialization/ASTWriter.cpp
llvm/include/llvm/ADT/FloatingPointMode.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81869.270832.patch
Type: text/x-patch
Size: 86326 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200615/2649c290/attachment-0001.bin>
More information about the cfe-commits
mailing list