[PATCH] D52839: Inform AST's UnaryOperator of FENV_ACCESS

2019-09-20 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn abandoned this revision. kpn added a comment. I believe Serge Pavlov has demonstrated a better way to do this. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D52839/new/ https://reviews.llvm.org/D52839 ___ cfe-commits mailing list cfe-com

[PATCH] D52839: Inform AST's UnaryOperator of FENV_ACCESS

2019-01-25 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added a comment. In D52839#1263794 , @rsmith wrote: > > 2. Track the FP environment somewhere more transient, probably on the `Scope` > object. When parsing an operator, store the environment on the expression, > and when performing a `TreeTransf

[PATCH] D52839: Inform AST's UnaryOperator of FENV_ACCESS

2018-10-12 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In https://reviews.llvm.org/D52839#1262449, @kpn wrote: > I forgot to address the template question. I've spend the past 18 years doing > SystemZ backend work on multiple {,JIT} compilers. I'm not really in a > position to answer your question about how to handle getting

[PATCH] D52839: Inform AST's UnaryOperator of FENV_ACCESS

2018-10-12 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn updated this revision to Diff 169464. kpn added a comment. Upload the correct diff this time. Sorry about the confusion! https://reviews.llvm.org/D52839 Files: include/clang/AST/Expr.h lib/AST/ASTImporter.cpp lib/Analysis/BodyFarm.cpp lib/CodeGen/CGExprScalar.cpp lib/CodeGen/CGObj

[PATCH] D52839: Inform AST's UnaryOperator of FENV_ACCESS

2018-10-12 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. I think you have uploaded the wrong patch here. https://reviews.llvm.org/D52839 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D52839: Inform AST's UnaryOperator of FENV_ACCESS

2018-10-12 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn updated this revision to Diff 169463. kpn added a comment. Address review comments. https://reviews.llvm.org/D52839 Files: include/llvm/IR/IRBuilder.h Index: include/llvm/IR/IRBuilder.h === --- include/llvm/IR/IRBuilder.h ++

[PATCH] D52839: Inform AST's UnaryOperator of FENV_ACCESS

2018-10-11 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added a comment. I forgot to address the template question. I've spend the past 18 years doing SystemZ backend work on multiple {,JIT} compilers. I'm not really in a position to answer your question about how to handle getting these FP bits down into C++ templates. I hope that won't hold up

[PATCH] D52839: Inform AST's UnaryOperator of FENV_ACCESS

2018-10-11 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: include/clang/AST/Expr.h:1791 + // otherwise. + unsigned FPFeatures : 3; + Why as the first one, and not after `CanOverflow` ... Comment at: include/clang/AST/Expr.h:1809 +Opc(opc), CanOve

[PATCH] D52839: Inform AST's UnaryOperator of FENV_ACCESS

2018-10-11 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn updated this revision to Diff 169266. kpn added a comment. Address review comments. Add a test case. The test depends on https://reviews.llvm.org/D53157, but it reads easily enough. Richard, does this work for you? https://reviews.llvm.org/D52839 Files: include/clang/AST/Expr.h lib/AS

[PATCH] D52839: Inform AST's UnaryOperator of FENV_ACCESS

2018-10-03 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Maybe take this very slightly further so it becomes testable: change the expression evaluator (lib/AST/ExprConstant.cpp) so it treats floating-point operations as non-constant if they're potentially-overflowing. You also need to update lib/Serialization/AST{Reader,Writer

[PATCH] D52839: Inform AST's UnaryOperator of FENV_ACCESS

2018-10-03 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn created this revision. kpn added a reviewer: rsmith. Herald added a reviewer: javed.absar. Herald added a subscriber: cfe-commits. The UnaryOperator needs to know about #pragma FENV_ACCESS to eventually properly emit the constrained math intrinsics. This diff just gets the information about