[PATCH] D85960: [AST][FPEnv] Keep FP options in trailing storage of CastExpr

2020-09-08 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 290487. sepavloff added a comment. Updated patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85960/new/ https://reviews.llvm.org/D85960 Files: clang/include/clang/AST/Expr.h clang/include/clang/AST/Exp

[PATCH] D85960: [AST][FPEnv] Keep FP options in trailing storage of CastExpr

2020-09-08 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff marked 3 inline comments as done. sepavloff added a comment. In D85960#2259703 , @riccibruno wrote: >> This change allow a CallExpr to have optional FPOptionsOverride object, > > Should this be `CastExpr` instead? Yes, thank you for the catch.

[PATCH] D78899: [Driver] Add callback to Command execution

2020-11-04 Thread Serge Pavlov via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG20b4f4f76030: [Driver] Add callback to Command execution (authored by sepavloff). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D88913: [FPEnv] Use strictfp metadata in casting nodes

2020-11-06 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff accepted this revision. sepavloff added a comment. This revision is now accepted and ready to land. LGTM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88913/new/ https://reviews.llvm.org/D88913 ___ cfe-commits mailing list cfe-comm

[PATCH] D78903: [Driver] Add option -fproc-stat-report

2020-11-12 Thread Serge Pavlov via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG92d7a84e128a: [Driver] Add option -fproc-stat-report (authored by sepavloff). Herald added a subscriber: dang. Changed prior to commit: https://re

[PATCH] D69272: Enable '#pragma STDC FENV_ACCESS' in frontend

2020-11-15 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff abandoned this revision. sepavloff added a comment. Implemented in D87528 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69272/new/ https://reviews.llvm.org/D69272 ___

[PATCH] D78903: [Driver] Add option -fproc-stat-report

2020-11-17 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. In D78903#2397845 , @tschuett wrote: > Could you add quotation marks around the executable name to make the CSV file > easier to parse? Implemented: rG9faedb2d7146

[PATCH] D87528: Enable '#pragma STDC FENV_ACCESS' in frontend cf. D69272 - Work in Progress

2020-09-29 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. In D87528#2299497 , @mibintc wrote: > In D87528#2297647 , @sepavloff wrote: > >> In D87528#2295015 , @mibintc wrote: >> >>> I tried using the 0924

[PATCH] D88498: [FPEnv] Evaluate initializers in constant rounding mode

2020-09-29 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff created this revision. sepavloff added reviewers: rsmith, rjmccall, mibintc. Herald added a project: clang. sepavloff requested review of this revision. Previously initializers were evaluated using rounding mode currently specified by Sema. If at the same time FP exception behavior was s

[PATCH] D88462: FP math settings for static duration initialization - work in progress

2020-09-29 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. Please look at D88498 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88462/new/ https://reviews.llvm.org/D88462 ___ cfe-commits mailing list c

[PATCH] D87822: [FPEnv] Evaluate constant expressions under non-default rounding modes

2020-09-29 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. In D87822#2301194 , @leonardchan wrote: > Thanks for looking into it. We have that commit but it still seems to be > failing for us with the same error. In D88498 this test is removed because us

[PATCH] D88498: [FPEnv] Evaluate initializers in constant rounding mode

2020-09-30 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 295194. sepavloff added a comment. Updated patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88498/new/ https://reviews.llvm.org/D88498 Files: clang/include/clang/Basic/LangOptions.h clang/include/clan

[PATCH] D88498: [FPEnv] Evaluate initializers in constant rounding mode

2020-09-30 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/lib/Parse/ParseDecl.cpp:2290 + // rounding mode. + if (VD->isFileVarDecl() || VD->isConstexpr() || + (!getLangOpts().CPlusPlus && VD->isStaticLocal())) { rsmith wrote: > It's far fr

[PATCH] D88498: [FPEnv] Evaluate initializers in constant rounding mode

2020-09-30 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/test/AST/const-fpfeatures-strict.c:39 + +// CHECK: @var_04 = {{.*}} %struct.S { float 0x3FF02000 } +// CHECK: @var_05 = {{.*}} %struct.S { float 0x3FF02000 } mibintc wrote: > I think the initializ

[PATCH] D88498: [FPEnv] Evaluate initializers in constant rounding mode

2020-09-30 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/lib/Parse/ParseDecl.cpp:2290 + // rounding mode. + if (VD->isFileVarDecl() || VD->isConstexpr() || + (!getLangOpts().CPlusPlus && VD->isStaticLocal())) { sepavloff wrote: > rsmith w

[PATCH] D78902: [Driver] Add output file to properties of Command

2020-10-04 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. Ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78902/new/ https://reviews.llvm.org/D78902 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D87528: Enable '#pragma STDC FENV_ACCESS' in frontend cf. D69272 - Work in Progress

2020-10-05 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/include/clang/Basic/LangOptions.h:410-411 setRoundingMode(LO.getFPRoundingMode()); +// FENV access is true if rounding math is enabled. +setAllowFEnvAccess((getRoundingMode() == llvm::RoundingMode::Dynamic)); se

[PATCH] D78902: [Driver] Add output file to properties of Command

2020-10-06 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 296451. sepavloff added a comment. Use MakeArgString to get persistent string Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78902/new/ https://reviews.llvm.org/D78902 Files: clang/include/clang/Driver/Job.

[PATCH] D78902: [Driver] Add output file to properties of Command

2020-10-06 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff marked an inline comment as done. sepavloff added inline comments. Comment at: clang/lib/Driver/ToolChains/HIP.cpp:135 + Bundler, BundlerArgs, Inputs, + InputInfo(&JA, Output.c_str(; }

[PATCH] D87528: Enable '#pragma STDC FENV_ACCESS' in frontend cf. D69272 - Work in Progress

2020-10-06 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. In D87528#2312230 , @mibintc wrote: > For the LIT test clang/test/AST/const-fpfeatures.cpp, currently failing in > this patch, the variables V1 and others are initialized via call to "global > var init" which performs the round

[PATCH] D78902: [Driver] Add output file to properties of Command

2020-10-07 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 296625. sepavloff marked an inline comment as done. sepavloff added a comment. Add default argument for parameter Output in constructors of Command* Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78902/new/ ht

[PATCH] D78902: [Driver] Add output file to properties of Command

2020-10-07 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/include/clang/Driver/Job.h:165 + const llvm::opt::ArgStringList &Arguments, ArrayRef Inputs, + ArrayRef Outputs); // FIXME: This really shouldn't be copyable, but is currently copied in some

[PATCH] D88913: [FPEnv] Use strictfp metadata in casting nodes

2020-10-07 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:139 + + switch (E->getStmtClass()) { + case Stmt::UnaryOperatorClass: { Actually this is not correct, because subclass relations are not preserved in this case. For instance, `C

[PATCH] D78902: [Driver] Add output file to properties of Command

2020-10-08 Thread Serge Pavlov via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG70bf35070a74: [Driver] Add output file to properties of Command (authored by sepavloff). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

[PATCH] D88913: [FPEnv] Use strictfp metadata in casting nodes

2020-10-12 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:137-139 + FPOptions FPFeatures = E->getFPFeaturesInEffect(CGF.getLangOpts()); + + ConstructorHelper(FPFeatures); The local variable `FPFeatures` can be eliminated here. ===

[PATCH] D88498: [FPEnv] Evaluate initializers in constant rounding mode

2020-10-14 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 298119. sepavloff added a comment. Updated patch - Reverted check to the previous version, in which it applied to C++ file level variables also. - Added workaround for constexpr functions. Now they are parsed with constant rounding mode, which allows to u

[PATCH] D89360: Treat constant contexts as being in the default rounding mode.

2020-10-14 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. I would propose to consider solution in D88498 . It tries to fix the real reason of the malfunction - using dynamic rounding mode for evaluation of global variable initializers. With the workaround for constexpr functions it allows to

[PATCH] D88498: [FPEnv] Evaluate initializers in constant rounding mode

2020-10-15 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 298375. sepavloff added a comment. Remade the patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88498/new/ https://reviews.llvm.org/D88498 Files: clang/include/clang/Basic/LangOptions.h clang/include/c

[PATCH] D89360: Treat constant contexts as being in the default rounding mode.

2020-10-15 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. In D89360#2330522 , @rsmith wrote: > In D89360#2329856 , @sepavloff wrote: > >> I would propose to consider solution in D88498 >> . It tries to fix the re

[PATCH] D88498: [FPEnv] Apply dynamic rounding to function body only

2020-10-15 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. Actually this solution also behaves wrong in some cases. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88498/new/ https://reviews.llvm.org/D88498 ___ cfe-commits mailing list c

[PATCH] D89360: Treat constant contexts as being in the default rounding mode.

2020-10-15 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. As C++ case is much more complicated and we need a ruleset based on essential properties rather than implementation viewpoint, I am convinced that the solution based on manifestly constant-evaluated property is the best. Thank you for the discussion! Repository: r

[PATCH] D89360: Treat constant contexts as being in the default rounding mode.

2020-10-15 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. Probably there is an issue with code generation. The source: constexpr float func_01(float x, float y) { return x + y; } float V1 = func_01(1.0F, 0x0.01p0F); compiled with '-frounding-math' must produce dynamic initializer. It however is evaluated at

[PATCH] D88913: [FPEnv] Use strictfp metadata in casting nodes

2020-10-19 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/test/CodeGen/aarch64-v8.2a-neon-intrinsics-constrained.c:26 +// metadata from the AST instead of the global default from the command line. +// FIXME: All cases of "fpexcept.maytrap" in this test are wrong. + kpn

[PATCH] D89690: [clang] update of the DragonFlyBSD's driver for the 5.8.x releases.

2020-10-19 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff accepted this revision. sepavloff added a comment. This revision is now accepted and ready to land. LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89690/new/ https://reviews.llvm.org/D89690 __

[PATCH] D88498: [FPEnv] Apply dynamic rounding to function body only

2020-10-20 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff abandoned this revision. sepavloff added a comment. In D88498#2339630 , @rsmith wrote: > The tests in this patch exhibit the same behavior with and without the patch > applied; I think almost all the functionality changes from here are > supe

[PATCH] D87528: Enable '#pragma STDC FENV_ACCESS' in frontend cf. D69272 - Work in Progress

2020-10-20 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff accepted this revision. sepavloff added a comment. LGTM There is concern with restoring FP options but it could be solved separately. Looking forward to results of SPEC runs! Comment at: clang/docs/UsersManual.rst:1389 * ``precise`` Disables optimizations that a

[PATCH] D89849: Add option 'exceptions' to pragma clang fp

2020-10-20 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff created this revision. sepavloff added reviewers: rsmith, rjmccall, mibintc, kpn. Herald added a subscriber: dexonsmith. Herald added a project: clang. sepavloff requested review of this revision. Pragma 'clang fp' is extended to support a new option, 'exceptions'. It allows to specify f

[PATCH] D89849: Add option 'exceptions' to pragma clang fp

2020-10-21 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/docs/LanguageExtensions.rst:3223 +// Preserve floating point exceptions +#pragma fp exceptions(strict) +z = x + y; mibintc wrote: > do you mean pragma clang fp ... Sure. Thank you!

[PATCH] D89849: Add option 'exceptions' to pragma clang fp

2020-10-22 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 299887. sepavloff added a comment. Added ActOnPragmaFPExceptions Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89849/new/ https://reviews.llvm.org/D89849 Files: clang/docs/LanguageExtensions.rst clang/in

[PATCH] D89849: Add option 'exceptions' to pragma clang fp

2020-10-22 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/lib/Parse/ParsePragma.cpp:3041 + if (AnnotValue->ExceptionsValue) +Actions.setExceptionMode(Tok.getLocation(), *AnnotValue->ExceptionsValue); ConsumeAnnotationToken(); mibintc wrote: > sepavloff wrote: >

[PATCH] D87528: Enable '#pragma STDC FENV_ACCESS' in frontend cf. D69272 - Work in Progress

2020-10-23 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/lib/Sema/SemaAttr.cpp:1020-1023 +// Resume the default rounding and exception modes. +NewFPFeatures.setRoundingModeOverride( +llvm::RoundingMode::NearestTiesToEven); +NewFPFeatures.setFPExceptionModeOverride(L

[PATCH] D78899: [Driver] Add callback to Command execution

2020-10-23 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. Ping. This is the only remaining prerequisite for D78903 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78899/new/ https://reviews.llvm.org/D78899 __

[PATCH] D90026: [FPEnv] Tests for rounding properties of constant evalution

2020-10-23 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff created this revision. sepavloff added reviewers: rsmith, rjmccall, mibintc. Herald added a project: clang. sepavloff requested review of this revision. These are moved from D88498 . Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D90026

[PATCH] D88913: [FPEnv] Use strictfp metadata in casting nodes

2020-10-26 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. Generally the patch looks good. But the need to expect incorrect values in tests is a concern. Maybe this is a consequence of storing exception behavior in a separate field of CGFPOptionsRAII. This misbehavior should be fixed. Comment at: clang/test

[PATCH] D88913: [FPEnv] Use strictfp metadata in casting nodes

2020-10-27 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. In D88913#2356152 , @kpn wrote: > In D88913#2353379 , @sepavloff wrote: > >> Generally the patch looks good. But the need to expect incorrect values in >> tests is a concern. Maybe this i

[PATCH] D90026: [FPEnv] Tests for rounding properties of constant evalution

2020-10-28 Thread Serge Pavlov via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG08bb5d9196b3: [FPEnv] Tests for rounding properties of constant evalution (authored by sepavloff). Repository: rG LLVM Github Monorepo CHANGES SI

[PATCH] D88913: [FPEnv] Use strictfp metadata in casting nodes

2020-10-29 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. This patch contains many tests and they are valuable. However many of them are likely to be compatible with unpatched compiler, so are not related to casting nodes. I would propose to move such tests into a separate patch and make this one dependent on it. Leave here

[PATCH] D90316: [FPEnv] Diagnose pragmas FENV_ROUND,_ACCESS and float_control if target does not support StrictFP

2020-10-30 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff accepted this revision. sepavloff added a comment. This revision is now accepted and ready to land. LGTM. Comment at: clang/test/Parser/pragma-fp-warn.c:1 + +// RUN: %clang_cc1 -triple wasm32 -fsyntax-only -Wno-unknown-pragmas -Wignored-pragmas -verify %s ---

[PATCH] D89849: Add option 'exceptions' to pragma clang fp

2020-10-31 Thread Serge Pavlov via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG6021cbea4d34: Add option 'exceptions' to pragma clang fp (authored by sepavloff). Changed prior to commit: https://reviews.llvm.org/D89849?vs=2998

[PATCH] D78899: [Driver] Add callback to Command execution

2020-11-03 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 302563. sepavloff added a comment. Added documentation Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78899/new/ https://reviews.llvm.org/D78899 Files: clang/include/clang/Driver/Compilation.h clang/lib/D

[PATCH] D103395: PR45879: Keep evaluated expression in LValue object

2021-05-31 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff created this revision. sepavloff added a reviewer: rsmith. sepavloff requested review of this revision. Herald added a project: clang. Class LValue keeps result of lvalue evaluation. In some analyses it is also necessary to have access to the original expression. This change adds new mem

[PATCH] D101429: PR45879: Use LValue object to evaluate active union members

2021-05-31 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff abandoned this revision. sepavloff added a comment. Alternative implementation in in https://reviews.llvm.org/D103395. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101429/new/ https://reviews.llvm.org/D101429 ___

[PATCH] D106804: [test-suite] Add tests for FP classification intrinsics

2021-09-15 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. If nobody objects, I would commit this change, as it would be useful in the forthcoming return of `llvm.isnan`. Repository: rT test-suite CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106804/new/ https://reviews.llvm.org/D106804 __

[PATCH] D106804: [test-suite] Add tests for FP classification intrinsics

2021-09-17 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. Thanks! Repository: rT test-suite CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106804/new/ https://reviews.llvm.org/D106804 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[PATCH] D106804: [test-suite] Add tests for FP classification intrinsics

2021-09-17 Thread Serge Pavlov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rTb983131b7e46: [test-suite] Add tests for FP classification intrinsics (authored by sepavloff). Repository: rT test-suite CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106804/new/ https://revie

[PATCH] D109925: [AST] add warnings for out-of-bounds FP values when using relaxed FP math compile flags

2021-09-20 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. I don't think the constant evaluator is a right place for such warnings. The option `-ffast-math` is a hint to the compiler, which, in particular, tells that no operation on Nans/Infs take place. It allows a compiler to generate better code. None is pertinent for the

[PATCH] D97094: [Driver] Print process statistics report on CC_PRINT_PROC_STAT env variable.

2021-02-20 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/include/clang/Driver/Driver.h:210 + /// Set CC_PRINT_PROC_STAT mode, which causes the frontend to dump + /// performance report to CC_PRINT_PROC_STAT_FILE or to stdout. Strictly speaking it is driver that dum

[PATCH] D97094: [Driver] Print process statistics report on CC_PRINT_PROC_STAT env variable.

2021-02-24 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/lib/Driver/Driver.cpp:4050 << ", mem=" << ProcStat->PeakMemory << " Kb\n"; - } - if (!StatReportFile.empty()) { + } else { // CSV format. vvereschaka wrote: > aganea wrote:

[PATCH] D104854: Introduce intrinsic llvm.isnan

2021-06-24 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff created this revision. sepavloff added reviewers: efriedma, kpn, thopre, jonpa, cameron.mcinally, RKSimon, craig.topper. Herald added subscribers: jdoerfert, pengfei, hiraditya. sepavloff requested review of this revision. Herald added projects: clang, LLVM. Herald added a subscriber: cf

[PATCH] D104854: Introduce intrinsic llvm.isnan

2021-06-24 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. In D104854#2838468 , @thopre wrote: > Are you planning to do this for the other FP test builtin (isinf, isfinite, > isinf_sign, isnormal)? Yes, they have similar problems. If someone would like to implement them it would be n

[PATCH] D104854: Introduce intrinsic llvm.isnan

2021-06-24 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. In D104854#2838659 , @jdoerfert wrote: > In D104854#2838495 , @sepavloff > wrote: > >> In D104854#2838468 , @thopre wrote: >> >>> Are you plann

[PATCH] D104854: Introduce intrinsic llvm.isnan

2021-06-24 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. In D104854#2838754 , @craig.topper wrote: > Doesn't gcc also fold isnan to false under fast math? If we diverge here that > means your code would only work correctly with clang. GCC does the same transformation, ICC and MSVC

[PATCH] D104854: Introduce intrinsic llvm.isnan

2021-07-31 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: llvm/test/Transforms/InstCombine/fpclass.ll:29 + ret <2 x i1> %t +} + RKSimon wrote: > You probably need some negative tests (no flags, ninf instead of nnan etc.)? Added few such tests. Repository: rG LLVM Github

[PATCH] D104854: Introduce intrinsic llvm.isnan

2021-08-02 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104854/new/ https://reviews.llvm.org/D104854 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[PATCH] D104854: Introduce intrinsic llvm.isnan

2021-08-09 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. In D104854#2932444 , @nemanjai wrote: > Rather than reverting this commit again, I pushed 62fe3dcf98d1 > to use > the same expansion as before (using unorde

[PATCH] D104854: Introduce intrinsic llvm.isnan

2021-08-10 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:6964 +return DAG.getSetCC(DL, ResultVT, Op, DAG.getConstantFP(0.0, DL, OperandVT), +ISD::SETUO); + nemanjai wrote: > sepavloff wrote: > > ne

[PATCH] D104854: Introduce intrinsic llvm.isnan

2021-08-13 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. Patch D108037 must make lowering of `llvm.isnan` more close to the code produced by `__builtin_isnan` earlier. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104854/new/ https://reviews.

[PATCH] D104854: Introduce intrinsic llvm.isnan

2021-06-30 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 355539. sepavloff added a comment. Herald added subscribers: kbarton, nemanjai. Addressed reviewer's notes - Math flags are set when ISNAN node is transformed, - They are set in calls to getNode, - WidenVecOp_ISNAN is made similar to WidenVecOp_SETCC, - Bui

[PATCH] D104854: Introduce intrinsic llvm.isnan

2021-06-30 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. In D104854#2841505 , @efriedma wrote: > I'd like to see some test coverage for all the floating-point types (half, > bfloat16, ppc_fp128). Tests for half are added to aarch64-fpclass.ll, new file was created to test ppc_fp128

[PATCH] D104854: Introduce intrinsic llvm.isnan

2021-06-30 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 355614. sepavloff added a comment. Missed optimization in X86 codegen proposed by Craig Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104854/new/ https://reviews.llvm.org/D104854 Files: clang/lib/CodeGen/C

[PATCH] D104854: Introduce intrinsic llvm.isnan

2021-07-12 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 357857. sepavloff added a comment. Rebased Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104854/new/ https://reviews.llvm.org/D104854 Files: clang/lib/CodeGen/CGBuiltin.cpp clang/test/CodeGen/X86/strictf

[PATCH] D103395: PR45879: Keep evaluated expression in LValue object

2021-07-12 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 357988. sepavloff added a comment. Rebased patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103395/new/ https://reviews.llvm.org/D103395 Files: clang/lib/AST/ExprConstant.cpp clang/test/SemaCXX/consta

[PATCH] D112932: [WIP] Use llvm.is_fpclass to implement FP classification functions

2021-11-01 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff created this revision. sepavloff requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Builtin floating-point number classification functions: - __builtin_isnan, - __builtin_isinf, - __builtin_finite, and - __builtin_isnormal now are

[PATCH] D103395: PR45879: Keep evaluated expression in LValue object

2021-11-03 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 384386. sepavloff added a comment. Updated patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103395/new/ https://reviews.llvm.org/D103395 Files: clang/lib/AST/ExprConstant.cpp clang/test/SemaCXX/consta

[PATCH] D103395: PR45879: Keep evaluated expression in LValue object

2021-11-03 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. Thank you for feedback! In D103395#3096177 , @tambre wrote: > This breaks the following code: > > struct sub > { > char data; > }; > > struct main > { > constexpr main() > { > member

[PATCH] D103395: PR45879: Keep evaluated expression in LValue object

2021-11-12 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 386823. sepavloff added a comment. Update the patch - Use more careful check for LHS expression, - Make a bit more precise LHS expression tracking, - Add comments, - Add the test from discussion. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

[PATCH] D103395: PR45879: Keep evaluated expression in LValue object

2021-11-12 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. In D103395#3105677 , @tambre wrote: > In D103395#3105668 , @sepavloff > wrote: > >> Strange, I see that it cannot be compiled neither by gcc nor by clang: >> https://godbolt.org/z/1dY9

[PATCH] D134859: [clang][Interp] Implement basic support for floating point values

2022-10-18 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/lib/AST/Interp/Boolean.h:59 explicit operator bool() const { return V; } + explicit operator double() const { return V; } Is there any reason why `operator double` exists, but `operator float` does not? =

[PATCH] D134859: [clang][Interp] Implement basic support for floating point values

2022-10-19 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/lib/AST/Interp/Floating.h:54-62 + explicit operator int8_t() const { return toAPSInt().getExtValue(); } + explicit operator uint8_t() const { return toAPSInt().getExtValue(); } + explicit operator int16_t() const { return toAP

[PATCH] D134337: [clang] [Driver] More flexible rules for loading default configs

2022-10-19 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. In D134337#3866267 , @mgorny wrote: > In D134337#3865905 , @tstellar > wrote: > >> In D134337#3865753 , @mgorny wrote: >> >>> In D134337#386554

[PATCH] D135439: Keep configuration file search directories in ExpansionContext. NFC

2022-10-19 Thread Serge Pavlov via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG0dec5e164f9d: Keep configuration file search directories in ExpansionContext. NFC (authored by sepavloff). Repository: rG LLVM Github Monorepo CH

[PATCH] D134859: [clang][Interp] Implement basic support for floating point values

2022-10-19 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/lib/AST/Interp/Floating.h:54-62 + explicit operator int8_t() const { return toAPSInt().getExtValue(); } + explicit operator uint8_t() const { return toAPSInt().getExtValue(); } + explicit operator int16_t() const { return toAP

[PATCH] D136354: [Driver] Enable nested configuration files

2022-10-20 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff created this revision. sepavloff added reviewers: aaron.ballman, kadircet, MaskRay, mgorny. Herald added subscribers: StephenFan, hiraditya. Herald added a project: All. sepavloff requested review of this revision. Herald added projects: clang, LLVM. Herald added a subscriber: llvm-commit

[PATCH] D133325: [Driver] Allow search of included response files as configuration files

2022-10-20 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. An alternative implementation is in D136354 . Instead of using new command-line option, it uses `--config` to include file, which is searched for as a configuration file. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTI

[PATCH] D136090: Handle errors in expansion of response files

2022-10-20 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 469286. sepavloff added a comment. Make UTF-16 string properly aligned Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136090/new/ https://reviews.llvm.org/D136090 Files: clang/include/clang/Basic/Diagnostic

[PATCH] D136090: Handle errors in expansion of response files

2022-10-22 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 469957. sepavloff added a comment. Small changes proposed by reviewers Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136090/new/ https://reviews.llvm.org/D136090 Files: clang/include/clang/Basic/Diagnostic

[PATCH] D136090: Handle errors in expansion of response files

2022-10-22 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: llvm/lib/Support/CommandLine.cpp:1188 + // macros. + if (!RelativeNames && !InConfigFile) return Error::success(); rovka wrote: > Why do you need to add `!InConfigFile` here and below? It is not necessary, beca

[PATCH] D136090: Handle errors in expansion of response files

2022-10-23 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 469978. sepavloff added a comment. Updated patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136090/new/ https://reviews.llvm.org/D136090 Files: clang/include/clang/Basic/DiagnosticDriverKinds.td clang

[PATCH] D136090: Handle errors in expansion of response files

2022-10-23 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/lib/Driver/Driver.cpp:1029 if (llvm::sys::path::is_relative(CfgFilePath)) { - if (getVFS().makeAbsolute(CfgFilePath)) -return true; - auto Status = getVFS().status(CfgFilePath); - i

[PATCH] D134859: [clang][Interp] Implement basic support for floating point values

2022-10-27 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/lib/AST/Interp/PrimType.h:39 PT_Bool, + PT_Float, PT_Ptr, In contrast to other members of this enumeration, `PT_Float` does not designate a concrete type, and it must creates problems. For example, how fu

[PATCH] D134859: [clang][Interp] Implement basic support for floating point values

2022-10-27 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/lib/AST/Interp/PrimType.h:39 PT_Bool, + PT_Float, PT_Ptr, tbaeder wrote: > sepavloff wrote: > > In contrast to other members of this enumeration, `PT_Float` does not > > designate a concrete type, and it

[PATCH] D136090: Handle errors in expansion of response files

2022-10-27 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. Ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136090/new/ https://reviews.llvm.org/D136090 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[PATCH] D136090: Handle errors in expansion of response files

2022-10-28 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/unittests/Driver/ToolChainTest.cpp:604-606 + char *StrBuff = (char *)Alloc.Allocate(6, 2); + std::memcpy(StrBuff, "\xFF\xFE\x00\xD8\x00\x00", 6); + StringRef BadUTF(StrBuff, 6); mgorny wrote: > Wouldn't it be

[PATCH] D136090: Handle errors in expansion of response files

2022-10-29 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136090/new/ https://reviews.llvm.org/D136090 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[PATCH] D136090: Handle errors in expansion of response files

2022-10-29 Thread Serge Pavlov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG17eb198de934: Handle errors in expansion of response files (authored by sepavloff). Changed prior to commit: https://reviews.llvm.org/D136090?vs=469978&id=471753#toc Repository: rG LLVM Github Monore

[PATCH] D129464: [Clang][CodeGen] Set FP options of builder at entry to compound statement

2022-08-15 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. As specific interaction of FP pragmas and template instantiation was not supported, this patch is actual without additional changes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129464/new/ https://reviews.llvm.org/D129

[PATCH] D132379: [Support] Class for response file expansion

2022-08-22 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff created this revision. sepavloff added reviewers: rjmccall, kadircet, jackoalan, thakis, rnk. Herald added a subscriber: hiraditya. Herald added a project: All. sepavloff requested review of this revision. Herald added subscribers: llvm-commits, MaskRay. Herald added projects: clang, LLVM

[PATCH] D132379: [Support] Class for response file expansion

2022-08-22 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. In D132379#3740102 , @thakis wrote: > Can you say what you're trying to do? There is an intention to extend algorithm of included files search. In particular it requires passing down paths where config files may be searched f

[PATCH] D129464: [Clang][CodeGen] Set FP options of builder at entry to compound statement

2022-08-23 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 454822. sepavloff edited the summary of this revision. sepavloff added a comment. Rebase and ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129464/new/ https://reviews.llvm.org/D129464 Files: clang/inc

[PATCH] D134018: [clang] [Driver] Add an option to disable default config filenames

2022-09-16 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff accepted this revision. sepavloff added a comment. LGTM. Thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134018/new/ https://reviews.llvm.org/D134018 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

<    1   2   3   4   5   6   7   >