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

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 13 10:17:23 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");
----------------
mibintc wrote:
> yaxunl wrote:
> > 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.
> > 
> @yaxunl Can you please send me a reproducer, I'd like to see what's going on, not sure if just getting rid of the assertion will give the desired outcome. 
{F11915161}

Pls apply the patch.

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 cfe-commits mailing list