[PATCH] D153339: [clang] Support vectors in __builtin_isfpclass

2023-08-28 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 553960. sepavloff added a comment. Fix documentation Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153339/new/ https://reviews.llvm.org/D153339 Files: clang/docs/LanguageExtensions.rst clang/lib/Sema/Sem

[PATCH] D153339: [clang] Support vectors in __builtin_isfpclass

2023-08-30 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 554750. sepavloff added a comment. Update documentation Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153339/new/ https://reviews.llvm.org/D153339 Files: clang/docs/LanguageExtensions.rst clang/docs/Rele

[PATCH] D153339: [clang] Support vectors in __builtin_isfpclass

2023-09-01 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 rG9fd57e4d4888: [clang] Support vectors in __builtin_isfpclass (authored by sepavloff). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTI

[PATCH] D157072: [clang][ExprConst] Check float operation input for signaling NaNs

2023-09-04 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/test/CXX/expr/expr.const/p2-0x.cpp:281-283 +constexpr float f10 = f2 - f2; +constexpr float f11 = f2 + f4; +constexpr float f12 = f2 / f2; I don't think silent NaN origination is a right behavior. By

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

2022-11-22 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. In D134859#3943926 , @tbaeder wrote: > FYI, I noticed the way the floating values are serialized doesn't work if the > `APFloat` heap-allocated anything; those values aren't preserved through > (de)serialization of course. > >

[PATCH] D138554: [clang][Interp] Use placement new to construct opcode arguments into bytecode vector

2022-11-23 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeEmitter.cpp:166 if constexpr (!std::is_pointer_v) { -const char *Data = reinterpret_cast(&Val); -Code.insert(Code.end(), Data, Data + Size); +if constexpr (std::is_trivially_copyable_v) { +

[PATCH] D138554: [clang][Interp] Use placement new to construct opcode arguments into bytecode vector

2022-11-23 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeEmitter.cpp:166 if constexpr (!std::is_pointer_v) { -const char *Data = reinterpret_cast(&Val); -Code.insert(Code.end(), Data, Data + Size); +if constexpr (std::is_trivially_copyable_v) { +

[PATCH] D138554: [clang][Interp] Use placement new to construct opcode arguments into bytecode vector

2022-11-24 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. I would propose not to have a special case for trivially copyable types, if that is possible. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.l

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

2022-11-30 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:152 + case CK_FloatingToIntegral: { +llvm::RoundingMode RM = getRoundingMode(CE); +Optional ToT = classify(CE->getType()); According to C standard (6.3.1.4p1): ```

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

2022-12-01 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:152 + case CK_FloatingToIntegral: { +llvm::RoundingMode RM = getRoundingMode(CE); +Optional ToT = classify(CE->getType()); tbaeder wrote: > sepavloff wrote: > > Accordi

[PATCH] D76599: Represent FP options in AST by special Statement node

2020-03-23 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff created this revision. sepavloff added reviewers: rsmith, rjmccall, andrew.w.kaylor, efriedma, mibintc, kpn, sammccall, hokein. Herald added subscribers: martong, arphaman. Herald added a project: clang. Now FPOption object is stored in the bits of Stmt class. The space there is limited

[PATCH] D76384: Move FPFeatures from BinaryOperator bitfields to Trailing storage

2020-04-02 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/include/clang/Basic/LangOptions.h:394 + return true; + } + erichkeane wrote: > rjmccall wrote: > > erichkeane wrote: > > > rjmccall wrote: > > > > rjmccall wrote: > > > > > erichkeane wrote: > > > > > > rjmc

[PATCH] D77379: [FPEnv] Use single enum to represent rounding mode

2020-04-03 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff created this revision. sepavloff added reviewers: rjmccall, andrew.w.kaylor, arsenm, kpn, cameron.mcinally, uweigand. Herald added subscribers: dexonsmith, hiraditya, wdng. Herald added a project: clang. Now compiler defines 5 sets of constants to represent rounding mode. These are: 1.

[PATCH] D69272: Restricted variant of '#pragma STDC FENV_ACCESS'

2019-11-04 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 227690. sepavloff added a comment. Removed diagnostics on inline functions As pointed out in review, strictfp attribute does not prevent from inlining, it only restrict cases where the inlining is possible. Repository: rG LLVM Github Monorepo CHANGES S

[PATCH] D69552: Move floating point related entities to namespace level

2019-11-16 Thread Serge Pavlov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe6584b2b7b2d: Move floating point related entities to namespace level (authored by sepavloff). Herald added a project: clang. Herald added a subscriber: cfe-commits. Changed prior to commit: https://rev

[PATCH] D69272: Restricted variant of '#pragma STDC FENV_ACCESS'

2019-12-20 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. In D69272#1792877 , @kpn wrote: > My understanding of this patch is that it only allows the #pragma at the top > of each function. It doesn't allow it in blocks inside the function. So if a > function has a block inside it that

[PATCH] D69272: Restricted variant of '#pragma STDC FENV_ACCESS'

2019-12-22 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. In D69272#1793234 , @rjmccall wrote: > In D69272#1792928 , @sepavloff wrote: > > > @hfinkel proposed to use outlining to extract a block with the #pragma to > > separate function. It coul

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

2019-12-26 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 235392. sepavloff added a comment. Updated patch Removed the previous limitation on use of the pragma, which restricted the pragma to the topmost block only. It should favor users who do not bother about performance but want the usage be as defined by the S

[PATCH] D75443: [AST] Unpack FPFeatures bits to BinaryOperator, NFC.

2020-03-11 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/include/clang/Basic/LangOptions.h:461 + constexpr static unsigned MaxExceptionValue = 3; + unsigned rounding_and_exceptions: 4; }; There are 5 rounding directions defined by IEEE-754, which we should eventuall

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

2020-01-16 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/docs/LanguageExtensions.rst:3031 +The ``#pragma float_control`` pragma allows floating-point precision and +floating-point exception behavior to be specified Floating-point precision refers to the number of bit

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

2020-01-17 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:13129 if (FunctionDecl *F = dyn_cast(CurContext)) { + // If the expression occurs inside an internal global_var_init_function + // then the FunctionDecl is not availble mibint

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

2020-01-20 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/lib/Parse/ParsePragma.cpp:2537 +if (!Actions.CurContext->isTranslationUnit()) { +//FIXME this seems to be the wrong way to check file-scope +//since the token immediately following a function definition Proba

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

2020-01-21 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. I don't see tests for correctness of the pragma stack (`pragma float_control(... push)`, `pragma float_control(pop)`). Can you add them? Comment at: clang/lib/Parse/ParsePragma.cpp:2537 +if (!Actions.CurContext->isTranslationUnit()) { +//FIXME th

[PATCH] D65994: Extended FPOptions with new attributes

2020-01-23 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 239893. sepavloff added a comment. Rebased the patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65994/new/ https://reviews.llvm.org/D65994 Files: clang/include/clang/AST/Stmt.h clang/include/clang/Bas

[PATCH] D65994: Extended FPOptions with new attributes

2020-01-26 Thread Serge Pavlov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4aea70ed3292: [FPEnv] Extended FPOptions with new attributes (authored by sepavloff). Changed prior to commit: https://reviews.llvm.org/D65994?vs=239893&id=240432#toc Repository: rG LLVM Github Monor

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

2020-01-27 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. Could you please rebase the patch against current master? The commit "4aea70ed3292 : [FPEnv] Extended FPOptions with new attributes" changed layout of FPOptions, which affects your patch. Repositor

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

2020-01-29 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 241352. sepavloff added a comment. Avoid using custom attribute, use Function::useFPIntrin instead. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69272/new/ https://reviews.llvm.org/D69272 Files: clang/inc

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

2020-01-30 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. You could check the scope where the pragma appears is the same way as `pragma clang fp` does. The code case tok::annot_pragma_fp: ProhibitAttributes(Attrs); Diag(Tok, diag::err_pragma_fp_scope); ConsumeAnnotationToken(); return StmtError(); is put in

[PATCH] D21767: Fix instantiation of friend function templates

2018-03-25 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 139758. sepavloff added a comment. Rebased patch Repository: rC Clang https://reviews.llvm.org/D21767 Files: include/clang/AST/ASTLambda.h include/clang/AST/Decl.h include/clang/Sema/Sema.h lib/AST/Decl.cpp lib/Sema/SemaTemplateInstantiate.cp

[PATCH] D24933: Enable configuration files in clang

2017-10-26 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 120403. sepavloff added a comment. Addressed reviewer's notes - Do not process binary directory separately but add it to the array of search directories. - Do not use result file name buffer for temporary data. https://reviews.llvm.org/D24933 Files: d

[PATCH] D24933: Enable configuration files in clang

2017-10-26 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff marked 4 inline comments as done. sepavloff added inline comments. Comment at: lib/Driver/Driver.cpp:637 + } + FilePath.clear(); + return false; hfinkel wrote: > Why do we do clear FilePath here? The intent was to avoid copying file name buffer. It h

[PATCH] D24933: Enable configuration files in clang

2017-10-27 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff marked 3 inline comments as done. sepavloff added inline comments. Comment at: lib/Driver/Driver.cpp:739 + // like: i386-clang.cfg -> x86_64-clang.cfg. + if (ArchPrefixLen < CfgFileName.size()) +FixedConfigFile += CfgFileName.substr(ArchPrefixLen); ---

[PATCH] D24933: Enable configuration files in clang

2017-11-19 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 123503. sepavloff added a comment. Updated patch - Added command line option for setting directories where config files are searched for, - Fixed architecture calculation, - Option --config in config file is now diagnosed, - Output made by option -v contai

[PATCH] D40013: [DeclPrinter] Allow printing fully qualified name of function declaration

2017-11-21 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. Thanks! https://reviews.llvm.org/D40013 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailma

[PATCH] D146188: [Clang][DOC] Add documentation in for __builtin_flt_rounds and __builtin_set_flt_rounds

2023-03-15 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/docs/LanguageExtensions.rst:3293 +This builtin is converted to llvm.set.rounding intrinsic in LLVM IR level +and not all targets support this intrinsic, so only x86 and arm targets +support this builtin. Since this builtin change

[PATCH] D146188: [Clang][DOC] Add documentation in for __builtin_flt_rounds and __builtin_set_flt_rounds

2023-03-21 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/docs/LanguageExtensions.rst:3288 +This builtin is restrcted to work on x86 and arm targets currently. When support +for the builtin is added for new targets, the manual should be updated accordingly. + xiongji9

[PATCH] D143919: [Clang] Copy strictfp attribute from pattern to instantiation

2023-02-26 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/D143919/new/ https://reviews.llvm.org/D143919 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[PATCH] D143919: [Clang] Copy strictfp attribute from pattern to instantiation

2023-02-26 Thread Serge Pavlov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG5cc91f977eaa: [Clang] Copy strictfp attribute from pattern to instantiation (authored by sepavloff). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143919/new

[PATCH] D144454: Add builtin for llvm set rounding

2023-03-01 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. C standard function `fesetround` accepts rounding mode in the form of target-specific values like `FE_TONEAREST`. They usually represent corresponding bits in control register, so are different for different targets. `llvm.set_rounding` in contrast accepts rounding mo

[PATCH] D144454: Add builtin for llvm set rounding

2023-03-02 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. In D144454#4163688 , @rjmccall wrote: > I see. If we're going to take the target-independent values specified by > `FLT_ROUNDS`, then the original builtin name is more appropriate. Of course, > this has the disadvantage of n

[PATCH] D144454: Add builtin for llvm set rounding

2023-03-06 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff accepted this revision. sepavloff added a comment. LGTM. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144454/new/ https://reviews.llvm.org/D144454 ___ cfe-commits mailing list cfe-com

[PATCH] D152351: [clang] Add __builtin_isfpclass

2023-06-18 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/D152351/new/ https://reviews.llvm.org/D152351 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[PATCH] D152351: [clang] Add __builtin_isfpclass

2023-06-18 Thread Serge Pavlov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7dd387d2971d: [clang] Add __builtin_isfpclass (authored by sepavloff). Changed prior to commit: https://reviews.llvm.org/D152351?vs=530772&id=532477#toc Repository: rG LLVM Github Monorepo CHANGES S

[PATCH] D153233: clang: Add __builtin_elementwise_rint and nearbyint

2023-06-18 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/docs/LanguageExtensions.rst:656 + T __builtin_elementwise_nearbyint(T x) round x to the nearest integer value in floating point format, floating point types + rounding halfw

[PATCH] D144802: clang: Add __builtin_elementwise_round

2023-06-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. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144802/new/ https://reviews.llvm.org/D144802 ___ cfe-commits mailing list cfe-co

[PATCH] D153339: [clang] Support vectors in __builtin_isfpclass

2023-06-20 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff created this revision. sepavloff added reviewers: rjmccall, aaron.ballman, arsenm, kpn, qiucf, efriedma. Herald added a project: All. sepavloff requested review of this revision. Herald added a subscriber: wdng. Herald added a project: clang. Builtin function `__builtin_isfpclass` now c

[PATCH] D143241: [Clang] Reset FP options before function instantiations

2023-06-21 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/D143241/new/ https://reviews.llvm.org/D143241 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[PATCH] D143241: [Clang] Reset FP options before function instantiations

2023-06-21 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/lib/Parse/ParseTemplate.cpp:1736 + // point of the template definition. + Actions.resetFPOptions(LPT.FPO); + rjmccall wrote: > Ah, is this bug specific to the MSVC-compatible template logic? Exactly. This is MS

[PATCH] D143241: [Clang] Reset FP options before function instantiations

2023-06-23 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. In D143241#4441812 , @rjmccall wrote: > Hmm. Why are we clearing the FP pragma stack instead of saving the old > context onto it and then restoring after instantiation? I don't think > semantic analysis ever depends on enclo

[PATCH] D143241: [Clang] Reset FP options before function instantiations

2023-06-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 rG98390ccb8056: [Clang] Reset FP options before function instantiations (authored by sepavloff). Repository: rG LLVM Github Monorepo CHANGES SINCE

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

2023-06-28 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. After implementation of D142001 and D143241 this patch is not neded anymore. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129464/new/ https://reviews

[PATCH] D143241: [Clang] Reset FP options before function instantiations

2023-06-02 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 527800. sepavloff added a comment. Use FPOptions from the place where template is defined rather than default Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143241/new/ https://reviews.llvm.org/D143241 Files:

[PATCH] D143919: [Clang] Copy strictfp attribute from pattern to instantiation

2023-02-13 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff created this revision. sepavloff added reviewers: rsmith, rjmccall, aaron.ballman, efriedma. Herald added a project: All. sepavloff requested review of this revision. Herald added a project: clang. If a template function contained a pragma that made it strictfp, code generation for such

[PATCH] D143919: [Clang] Copy strictfp attribute from pattern to instantiation

2023-02-13 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. In D143919#4123616 , @efriedma wrote: > We have code somewhere to generically copy attributes from function templates > to instantiations, right? Why do we need to explicitly copy StrictFPAttr in > particular, separate from t

[PATCH] D143919: [Clang] Copy strictfp attribute from pattern to instantiation

2023-02-15 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 497609. sepavloff added a comment. Changed the way to copy strictfp attribute Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143919/new/ https://reviews.llvm.org/D143919 Files: clang/include/clang/Sema/Sema

[PATCH] D143919: [Clang] Copy strictfp attribute from pattern to instantiation

2023-02-15 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. In D143919#4123922 , @rjmccall wrote: > In D143919#4123712 , @sepavloff > wrote: > >> In D143919#4123616 , @efriedma >> wrote: >> >>> We have

[PATCH] D143919: [Clang] Copy strictfp attribute from pattern to instantiation

2023-02-15 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. In D143919#4130178 , @efriedma wrote: > If the "strictfp" attribute is based on the contents of the function body, > should we recompute it when the function is instantiated, as opposed to > copying it? For example, say you h

[PATCH] D143919: [Clang] Copy strictfp attribute from pattern to instantiation

2023-02-16 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 498248. sepavloff added a comment. Remove copying StrictFPAttr from InstantiateAttrs Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143919/new/ https://reviews.llvm.org/D143919 Files: clang/include/clang/Se

[PATCH] D143919: [Clang] Copy strictfp attribute from pattern to instantiation

2023-02-16 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/lib/Sema/SemaTemplateInstantiateDecl.cpp:824 + continue; +} + efriedma wrote: > sepavloff wrote: > > efriedma wrote: > > > Is this necessary? The non-delayed-parsed case seems to work correctly > > > o

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

2023-06-06 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 529156. sepavloff added a comment. Herald added subscribers: llvm-commits, hiraditya. Herald added a project: LLVM. Add createIsFPClass to IRBuilder Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112932/new/ h

[PATCH] D152351: [clang] Add __builtin_isfpclass

2023-06-07 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff created this revision. sepavloff added reviewers: rjmccall, aaron.ballman, arsenm, kpn, qiucf, efriedma. Herald added a subscriber: hiraditya. Herald added a project: All. sepavloff requested review of this revision. Herald added subscribers: llvm-commits, wdng. Herald added projects: cl

[PATCH] D152351: [clang] Add __builtin_isfpclass

2023-06-07 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 529243. sepavloff added a comment. Add check for test bit mask value Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152351/new/ https://reviews.llvm.org/D152351 Files: clang/include/clang/Basic/Builtins.def

[PATCH] D152351: [clang] Add __builtin_isfpclass

2023-06-07 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. In D152351#4402615 , @qiucf wrote: > It's necessary to check range of first argument in `SemaChecking.cpp` using > `SemaBuiltinConstantArgRange`. > > _Bool check_isfpclass_1(float x) { return __builtin_isfpclass(123456, x); }

[PATCH] D152351: [clang] Add __builtin_isfpclass

2023-06-09 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 530041. sepavloff added a comment. Updated patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152351/new/ https://reviews.llvm.org/D152351 Files: clang/docs/LanguageExtensions.rst clang/docs/ReleaseNote

[PATCH] D152351: [clang] Add __builtin_isfpclass

2023-06-09 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff marked 8 inline comments as done. sepavloff added a comment. In D152351#4403904 , @aaron.ballman wrote: > In D152351#4402785 , @arsenm wrote: > >> Also should get mentioned in the builtin docs and relea

[PATCH] D152351: [clang] Add __builtin_isfpclass

2023-06-12 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 530772. sepavloff added a comment. Herald added subscribers: aheejin, dschuff. Updated patch - Added named constants for data classes, - Fixed documentation, - Changed test for generated IR. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D152351: [clang] Add __builtin_isfpclass

2023-06-12 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff marked 2 inline comments as done. sepavloff added inline comments. Comment at: clang/test/CodeGen/isfpclass.c:2 +// RUN: %clang_cc1 -triple x86_64-linux-gnu -S -O1 -emit-llvm %s -o - | FileCheck %s + +_Bool check_isfpclass_finite(float x) { arsenm wrot

[PATCH] D139507: [Intrinsic] Add get.rounding as alias to flt.rounds and rename related DAG nodes

2022-12-07 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. Thank you for working on this! Is there any reason why we should keep the old intrinsic? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139507/new/ https://reviews.llvm.org/D139507 ___

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

2022-12-07 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/lib/AST/Interp/Floating.h:109 +Floating RHS = B; +if (!A.compatibleWith(B)) + RHS = B.toSemantics(A, RM); tbaeder wrote: > sepavloff wrote: > > Do we really need this check? In AST operands of additi

[PATCH] D139507: [Intrinsic] Add get.rounding as alias to flt.rounds and rename related DAG nodes

2022-12-08 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. LGTM. In D139507#3980555 , @qiucf wrote: > In D139507#3978449 , @sepavloff > wrote: > >> Thank you for working on this! >> >> Is there any reason why we should keep the old intrinsic?

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

2022-12-11 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 481901. sepavloff added a comment. Herald added a subscriber: pengfei. Prepare the patch for review In this patch the callback `TargetCodeGenInfo::testFPKind` is preserved, to make this change safer. Repository: rG LLVM Github Monorepo CHANGES SINCE LA

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

2022-12-13 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/test/CodeGen/strictfp_builtins.c:160 +// CHECK-NEXT:[[TMP1:%.*]] = call double @llvm.fabs.f64(double [[TMP0]]) #[[ATTR5]] +// CHECK-NEXT:[[ISINF:%.*]] = call i1 @llvm.experimental.constrained.fcmp.f64(double [[TMP1]], d

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

2022-12-15 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:607 +if (*LT == PT_Float) { + if (!this->emitAddf(getRoundingMode(E), E)) +return false; As discussed previously, compound assign operator cannot be implemented

[PATCH] D31126: Do not run tests for crash recovery if libstdc++ safe mode is enabled

2017-03-19 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff created this revision. If expensive checks are enabled, safe mode of libstdc++ is enabled too. In this mode the library uses more complex data that allow additional checks, for instance, a container may keep list of iterators that points to it. If a code crashes it can leave these comple

[PATCH] D30170: Function definition may have uninstantiated body

2017-03-20 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 92340. sepavloff added a comment. Small simplicifation https://reviews.llvm.org/D30170 Files: include/clang/AST/Decl.h lib/AST/Decl.cpp lib/Sema/SemaDecl.cpp test/SemaCXX/cxx0x-cursory-default-delete.cpp test/SemaCXX/friend2.cpp Index: test/Sem

[PATCH] D31126: Do not run tests for crash recovery if libstdc++ safe mode is enabled

2017-03-27 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. Any feedback? https://reviews.llvm.org/D31126 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D31126: Do not run tests for crash recovery if libstdc++ safe mode is enabled

2017-04-13 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. The problem solved by the fix is still actual. https://reviews.llvm.org/D31126 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D31126: Do not run tests for crash recovery if libstdc++ safe mode is enabled

2017-04-14 Thread Serge Pavlov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL300392: Do not run tests for crash recovery if libstdc++ safe mode is enabled (authored by sepavloff). Changed prior to commit: https://reviews.llvm.org/D31126?vs=92276&id=95372#toc Repository: rL LL

[PATCH] D24933: Enable configuration files in clang

2017-02-01 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 86761. sepavloff added a comment. Herald added a subscriber: danalbert. Updated patch Use more robust algorithm to determine custom compiler prefix. Bring the code in sync with changes in llvm patch. https://reviews.llvm.org/D24933 Files: docs/UsersMan

[PATCH] D24933: Enable configuration files in clang

2017-02-06 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 87229. sepavloff added a comment. Herald added a subscriber: klimek. Updated patch https://reviews.llvm.org/D24933 Files: docs/UsersManual.rst include/clang/Basic/DiagnosticDriverKinds.td include/clang/Config/config.h.cmake include/clang/Driver/Dr

[PATCH] D24933: Enable configuration files in clang

2017-02-06 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff marked 2 inline comments as done. sepavloff added inline comments. Comment at: lib/Driver/ToolChain.cpp:183 std::string Target; - if (llvm::TargetRegistry::lookupTarget(Prefix, IgnoredError)) { + if (!VerifyTarget || llvm::TargetRegistry::lookupTarget(Prefix, Igno

[PATCH] D16579: Warn if friend function depends on template parameters.

2017-07-10 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 105853. sepavloff added a comment. Updated patch - Remove changes that are not needed anymore, - Function matching is implemented on recursive function instead of TypeVisitor. It support subset of checks, which should be enough for practical use. - Added

[PATCH] D30170: Function definition may have uninstantiated body

2017-07-12 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 106192. sepavloff added a comment. Rebased patch https://reviews.llvm.org/D30170 Files: include/clang/AST/Decl.h lib/Sema/SemaDecl.cpp lib/Sema/SemaTemplateInstantiateDecl.cpp test/SemaCXX/friend2.cpp Index: test/SemaCXX/friend2.cpp =

[PATCH] D21508: Diagnose friend function template redefinitions

2017-07-17 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 106912. sepavloff edited the summary of this revision. sepavloff added a comment. Aligned implementation with https://reviews.llvm.org/D30170. https://reviews.llvm.org/D21508 Files: include/clang/AST/DeclBase.h lib/AST/Decl.cpp lib/Sema/SemaDecl.cpp

[PATCH] D21767: Fix instantiation of friend function templates

2017-07-17 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 106914. sepavloff added a comment. Aligned implementation with https://reviews.llvm.org/D21508. https://reviews.llvm.org/D21767 Files: lib/AST/Decl.cpp lib/Sema/SemaTemplateInstantiate.cpp test/SemaTemplate/instantiate-friend-function.cpp Index: te

[PATCH] D30170: Function definition may have uninstantiated body

2017-07-17 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. Ping. https://reviews.llvm.org/D30170 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D21508: Diagnose friend function template redefinitions

2017-07-18 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 107091. sepavloff added a comment. Simplified patch https://reviews.llvm.org/D21508 Files: include/clang/AST/DeclBase.h lib/AST/Decl.cpp lib/Sema/SemaDecl.cpp lib/Sema/SemaTemplateInstantiateDecl.cpp test/SemaCXX/friend2.cpp Index: test/SemaCXX

[PATCH] D21767: Fix instantiation of friend function templates

2017-07-23 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 107817. sepavloff added a comment. Reworked patch Used more general way to cope with calculation of instantiation stack, which is suitable for cases represented in PR26512. Added new tests. https://reviews.llvm.org/D21767 Files: include/clang/AST/ASTL

[PATCH] D42360: [6.0.0 Release] Release notes for configuration files in clang

2018-01-22 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff created this revision. sepavloff added reviewers: hfinkel, hans. Repository: rC Clang https://reviews.llvm.org/D42360 Files: docs/ReleaseNotes.rst Index: docs/ReleaseNotes.rst === --- docs/ReleaseNotes.rst +++ docs/R

[PATCH] D42360: [6.0.0 Release] Release notes for configuration files in clang

2018-01-22 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 130870. sepavloff added a comment. Use web link to reference documentation Repository: rC Clang https://reviews.llvm.org/D42360 Files: docs/ReleaseNotes.rst Index: docs/ReleaseNotes.rst ==

[PATCH] D42360: [6.0.0 Release] Release notes for configuration files in clang

2018-01-22 Thread Serge Pavlov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL323132: [6.0.0 Release] Release notes for configuration files in clang (authored by sepavloff, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D423

[PATCH] D30032: Process attributes 'ifunc' and 'alias' when checking for redefinition

2017-02-16 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff created this revision. These attributes effectively turns a non-defining declaration into a definition, so the case when the declaration already has a body must be diagnosed properly. https://reviews.llvm.org/D30032 Files: lib/Sema/SemaDecl.cpp test/Sema/alias-redefinition.c tes

[PATCH] D30032: Process attributes 'ifunc' and 'alias' when checking for redefinition

2017-02-17 Thread Serge Pavlov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL295541: Process attributes 'ifunc' and 'alias' when checking for redefinition (authored by sepavloff). Changed prior to commit: https://reviews.llvm.org/D30032?vs=88700&id=89017#toc Repository: rL LL

[PATCH] D30170: Function definition may have uninstantiated body

2017-02-20 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff created this revision. Current implementation of `FunctionDecl::isDefined` does not take into account declarations that do not have a body, but it can be instantiated from a templated definition. This behavior creates problems when processing friend functions defined in class templates.

[PATCH] D30170: Function definition may have uninstantiated body

2017-02-21 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 89206. sepavloff added a comment. Implement `isDefined` through `isThisDeclarationADefinition`. https://reviews.llvm.org/D30170 Files: include/clang/AST/Decl.h lib/AST/Decl.cpp lib/Sema/SemaDecl.cpp test/SemaCXX/cxx0x-cursory-default-delete.cpp

[PATCH] D30375: Function with unparsed body is a definition

2017-02-25 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff created this revision. While a function body is being parsed, the function declaration is not considered as a definition because it does not have a body yet. In some cases it leads to incorrect interpretation, the case is presented in https://bugs.llvm.org/show_bug.cgi?id=14785:

[PATCH] D30393: Do not inherit default arguments for friend function in class template.

2017-02-26 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff created this revision. A function declared in a friend declaration may have declarations prior to the containing class definition. If such declaration defines default argument, the friend function declaration inherits them. This behavior causes problems if the class where the friend is d

[PATCH] D24933: Enable configuration files in clang

2017-03-01 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. Glad to know that someone is interested in this feature! Below is actual proposal. **Adding named configuration files to clang driver** A configuration file is a collection of driver options, which are inserted into command line before other options specified in the c

[PATCH] D26065: Improve diagnostics if friend function redefines file-level function.

2017-03-06 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. Ping. https://reviews.llvm.org/D26065 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D24933: Enable configuration files in clang

2016-12-12 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 81055. sepavloff marked 4 inline comments as done. sepavloff added a comment. Updated patch. - Directories which are searched for config files are now defined during project configuration process using special cmake options. - Driver do not warn on unused

<    1   2   3   4   5   6   7   >