[PATCH] D72841: Add support for pragma float_control, to control precision and exception behavior at the source level

Yaxun Liu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 12 17:15:39 PDT 2020


yaxunl added inline comments.


================
Comment at: clang/lib/Serialization/ASTReader.cpp:7899
+    if (FpPragmaCurrentLocation.isInvalid()) {
+      assert(*FpPragmaCurrentValue == SemaObj->FpPragmaStack.DefaultValue &&
+             "Expected a default pragma float_control value");
----------------
This changes the behavior regarding AST reader and seems to be too hash restriction. Essentially this requires a pch can only be used with the same fp options with which the pch is generated. Since there are lots of fp options, it is impractical to generate pch for all the combinations.

We have seen regressions due to this assertion.

Can this assertion be dropped or done under some options?

Thanks.



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72841/new/

https://reviews.llvm.org/D72841





More information about the llvm-commits mailing list