[PATCH] D159024: [Parser] Parse string literal arguments of 'availability', 'external_source_symbol' and 'uuid' attributes as unevaluated

2023-08-30 Thread Sergei Barannikov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa7eaaba69906: [Parser] Parse string literal arguments of availability… (authored by barannikov88). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159024/new/

[PATCH] D154773: [AST] Use correct APSInt width when evaluating string literals

2023-09-05 Thread Sergei Barannikov 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 rG18a628ec4ef7: [AST] Use correct APSInt width when evaluating string literals (authored by barannikov88). Repository: rG LLVM Github Monorepo

[PATCH] D159393: [clang] Fix several issues in the generated AttrHasAttributeImpl.inc

2023-09-05 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added a comment. Should I create a github PR instead? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159393/new/ https://reviews.llvm.org/D159393 ___ cfe-commits mailing list

[PATCH] D159393: [clang] Fix several issues in the generated AttrHasAttributeImpl.inc

2023-09-01 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 created this revision. Herald added subscribers: s.egerton, PkmX, simoncook, kristof.beyls, krytarowski, arichardson, dylanmckay. Herald added a reviewer: aaron.ballman. Herald added a project: All. barannikov88 requested review of this revision. Herald added subscribers:

[PATCH] D159393: [clang] Fix several issues in the generated AttrHasAttributeImpl.inc

2023-09-01 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 updated this revision to Diff 51. barannikov88 added a comment. Update one more test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159393/new/ https://reviews.llvm.org/D159393 Files: clang/test/Preprocessor/has_attribute.c

[PATCH] D159393: [clang] Fix several issues in the generated AttrHasAttributeImpl.inc

2023-09-01 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added inline comments. Comment at: clang/test/Preprocessor/has_attribute.cpp:35 +CXX11(clang::warn_unused_result) + // CHECK: __gnu__::__const__: 1 For the context, the attribute is defined with the following spellings: ``` let Spellings =

[PATCH] D159024: [Parser] Parse string literal arguments of 'availability', 'external_source_symbol' and 'uuid' attributes as unevaluated

2023-08-29 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 updated this revision to Diff 554497. barannikov88 added a comment. Update the failing test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159024/new/ https://reviews.llvm.org/D159024 Files: clang/lib/Parse/ParseDecl.cpp

[PATCH] D159393: [clang] Fix several issues in the generated AttrHasAttributeImpl.inc

2023-10-08 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added a comment. @aaron.ballman I added a release note as requested. Please see if it looks the way it should. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159393/new/ https://reviews.llvm.org/D159393

[PATCH] D159393: [clang] Fix several issues in the generated AttrHasAttributeImpl.inc

2023-10-08 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 updated this revision to Diff 557644. barannikov88 added a comment. Add a hyphen Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159393/new/ https://reviews.llvm.org/D159393 Files: clang/docs/ReleaseNotes.rst

[PATCH] D159393: [clang] Fix several issues in the generated AttrHasAttributeImpl.inc

2023-10-08 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 updated this revision to Diff 557642. barannikov88 added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159393/new/ https://reviews.llvm.org/D159393 Files: clang/test/Preprocessor/has_attribute.c

[PATCH] D159393: [clang] Fix several issues in the generated AttrHasAttributeImpl.inc

2023-10-08 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 updated this revision to Diff 557643. barannikov88 added a comment. Add a release note Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159393/new/ https://reviews.llvm.org/D159393 Files: clang/docs/ReleaseNotes.rst

[PATCH] D159393: [clang] Fix several issues in the generated AttrHasAttributeImpl.inc

2023-10-10 Thread Sergei Barannikov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG79f87be6888d: [clang] Fix several issues in the generated AttrHasAttributeImpl.inc (authored by barannikov88). Changed prior to commit: https://reviews.llvm.org/D159393?vs=557644=557657#toc

[PATCH] D159024: [Parser] Parse string literal arguments of 'availability', 'external_source_symbol' and 'uuid' attributes as unevaluated

2023-08-28 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 created this revision. barannikov88 added reviewers: cor3ntin, aaron.ballman. Herald added a subscriber: jdoerfert. Herald added a project: All. barannikov88 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This is a

[PATCH] D128465: [llvm] add zstd to `llvm::compression` namespace

2022-07-19 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added a comment. @ckissane I took fresh sources of LLVM and when I run cmake I get the following warning: -- Looking for compress2 -- Looking for compress2 - found CMake Warning at cmake/config-ix.cmake:149 (find_package): By not providing "Findzstd.cmake" in

[PATCH] D130394: [clang][CodeGen] Factor out Swift ABI hooks (NFCI)

2022-07-26 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added a comment. Kindly ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130394/new/ https://reviews.llvm.org/D130394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D130394: [clang][CodeGen] Factor out Swift ABI hooks (NFCI)

2022-07-28 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added a reviewer: aaron.ballman. barannikov88 added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130394/new/ https://reviews.llvm.org/D130394 ___ cfe-commits mailing list

[PATCH] D130322: [clang][CodeGen] Only include ABIInfo.h where required (NFC)

2022-07-21 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added a comment. To reviewers: if you are OK with the patch, could you please merge it? I don't have permission yet. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130322/new/ https://reviews.llvm.org/D130322

[PATCH] D130322: [clang][CodeGen] Only include ABIInfo.h where required (NFC)

2022-07-21 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 updated this revision to Diff 446685. barannikov88 added a comment. Removed forward declaration of non-existent class. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130322/new/ https://reviews.llvm.org/D130322 Files:

[PATCH] D130268: [WIP] Add SmallVector constructor to allow creation of SmallVector from ArrayRef of items convertible to type T

2022-07-21 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added inline comments. Comment at: clang/lib/CodeGen/CGExprConstant.cpp:504 llvm::StructType *STy = llvm::ConstantStruct::getTypeForElements( - CGM.getLLVMContext(), Packed ? PackedElems : UnpackedElems, Packed); + CGM.getLLVMContext(), Packed ?

[PATCH] D130322: [clang][CodeGen] Only include ABIInfo.h where required (NFC)

2022-07-21 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added inline comments. Comment at: clang/lib/CodeGen/CGCall.h:26 -// FIXME: Restructure so we don't have to expose so much stuff. -#include "ABIInfo.h" - This is the main change. The included file was not used here at all. Repository: rG LLVM

[PATCH] D130322: [clang][CodeGen] Only include ABIInfo.h where required

2022-07-21 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 created this revision. Herald added a project: All. barannikov88 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D130322 Files: clang/lib/CodeGen/CGBuiltin.cpp

[PATCH] D130322: [clang][CodeGen] Only include ABIInfo.h where required (NFC)

2022-07-21 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.h:49 public: - TargetCodeGenInfo(std::unique_ptr Info) : Info(std::move(Info)) {} + TargetCodeGenInfo(std::unique_ptr Info); virtual ~TargetCodeGenInfo(); Had to do this due to

[PATCH] D130322: [clang][CodeGen] Only include ABIInfo.h where required (NFC)

2022-07-21 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added inline comments. Comment at: clang/lib/CodeGen/ABIInfo.h:39 -namespace swiftcall { - class SwiftAggLowering; -} Not used in this file. (This class does not seem to be used anywhere.) Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D130268: [WIP] Add SmallVector constructor to allow creation of SmallVector from ArrayRef of items convertible to type T

2022-07-21 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added inline comments. Comment at: clang/lib/CodeGen/CGExprConstant.cpp:504 llvm::StructType *STy = llvm::ConstantStruct::getTypeForElements( - CGM.getLLVMContext(), Packed ? PackedElems : UnpackedElems, Packed); + CGM.getLLVMContext(), Packed ?

[PATCH] D130268: [WIP] Add SmallVector constructor to allow creation of SmallVector from ArrayRef of items convertible to type T

2022-07-21 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added inline comments. Comment at: clang/lib/CodeGen/CGExprConstant.cpp:504 llvm::StructType *STy = llvm::ConstantStruct::getTypeForElements( - CGM.getLLVMContext(), Packed ? PackedElems : UnpackedElems, Packed); + CGM.getLLVMContext(), Packed ?

[PATCH] D130268: [NFC] Add SmallVector constructor to allow creation of SmallVector from ArrayRef of items convertible to type T

2022-07-22 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added inline comments. Comment at: clang/lib/CodeGen/CGExprConstant.cpp:504 llvm::StructType *STy = llvm::ConstantStruct::getTypeForElements( - CGM.getLLVMContext(), Packed ? PackedElems : UnpackedElems, Packed); + CGM.getLLVMContext(), Packed ?

[PATCH] D130268: [NFC] Add SmallVector constructor to allow creation of SmallVector from ArrayRef of items convertible to type T

2022-07-22 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added inline comments. Comment at: llvm/include/llvm/ADT/SmallVector.h:35 +template class ArrayRef; + Should be `typename T`. `class T` is archaic. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D130322: [clang][CodeGen] Only include ABIInfo.h where required (NFC)

2022-07-22 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added a comment. @MaskRay Would you please merge it? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130322/new/ https://reviews.llvm.org/D130322 ___ cfe-commits mailing list

[PATCH] D130689: [LLVM] Update C++ standard to 17

2022-07-28 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added a comment. There are a few places (primarily in ADT and Support) that check __cplusplus > 201402. Do they need to be cleaned up? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130689/new/ https://reviews.llvm.org/D130689

[PATCH] D130322: [clang][CodeGen] Only include ABIInfo.h where required (NFC)

2022-07-22 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added a comment. In D130322#3672362 , @MaskRay wrote: > Testing and will push in one minute Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130322/new/ https://reviews.llvm.org/D130322

[PATCH] D130394: [clang][CodeGen] Factor out Swift ABI hooks

2022-07-22 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 created this revision. Herald added a subscriber: dschuff. Herald added a project: All. barannikov88 requested review of this revision. Herald added subscribers: cfe-commits, aheejin. Herald added a project: clang. Swift calling conventions stands out in the way that they are lowered

[PATCH] D130394: [clang][CodeGen] Factor out Swift ABI hooks

2022-07-22 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 updated this revision to Diff 446953. barannikov88 added a comment. Reword commit message. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130394/new/ https://reviews.llvm.org/D130394 Files: clang/lib/CodeGen/ABIInfo.h

[PATCH] D130394: [clang][CodeGen] Factor out Swift ABI hooks (NFCI)

2022-08-04 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130394/new/ https://reviews.llvm.org/D130394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D130394: [clang][CodeGen] Factor out Swift ABI hooks (NFCI)

2022-08-05 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 updated this revision to Diff 450298. barannikov88 added a comment. Assert that Swift ABI info is initialized before accessing it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130394/new/ https://reviews.llvm.org/D130394 Files:

[PATCH] D130394: [clang][CodeGen] Factor out Swift ABI hooks (NFCI)

2022-08-05 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 updated this revision to Diff 450294. barannikov88 added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130394/new/ https://reviews.llvm.org/D130394 Files: clang/lib/CodeGen/ABIInfo.h

[PATCH] D130394: [clang][CodeGen] Factor out Swift ABI hooks (NFCI)

2022-08-05 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.h:63 + /// Returns Swift ABI info helper for the target. + const SwiftABIInfo () const { return *SwiftInfo; } + aaron.ballman wrote: > `SwiftInfo` isn't always initialized to a

[PATCH] D130394: [clang][CodeGen] Factor out Swift ABI hooks (NFCI)

2022-08-07 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added a comment. In D130394#3705047 , @inclyc wrote: > (Not a serious review) It seems like that your patch has already been > accepted, so that I can commit this patch for you. It was very nice of you, thanks! Repository: rG LLVM

[PATCH] D131225: Driver: Refactor and support per target dirs in baremetal

2022-08-10 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added a comment. Still LGTM Comment at: clang/lib/Driver/ToolChains/BareMetal.h:2 +//===--- BareMetal.h - Bare Metal Tool and ToolChain -*- C++ +//-*-===// // Line overflowed Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D131563: [WIP] [clang] Fix clang multiarch isssue with musl

2022-08-10 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added a comment. The diff seems to be restricted to few lines. It should include the full context. Comment at: clang/lib/Driver/ToolChains/Linux.cpp:49 + std::string EnvName = TargetTriple.isMusl() ? "musl" : "gnu"; + * `!isMusl()` does not

[PATCH] D130394: [clang][CodeGen] Factor out Swift ABI hooks (NFCI)

2022-08-02 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130394/new/ https://reviews.llvm.org/D130394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D130689: [LLVM] Update C++ standard to 17

2022-08-08 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added a comment. In D130689#3706263 , @aaron.ballman wrote: > The failures I am getting are the same as what's shown by the sanitizer bot > for Windows: > https://lab.llvm.org/buildbot/#/builders/127/builds/33980/steps/4/logs/stdio >

[PATCH] D131225: Driver: Refactor and support per target dirs in baremetal

2022-08-08 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added a comment. In D131225#3706207 , @abidh wrote: > I think this patch is moving the things in the right direction. But please > wait for some other reviewers to chime in. It seems quite opposite to me. Comment at:

[PATCH] D131225: Driver: Refactor and support per target dirs in baremetal

2022-08-08 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added inline comments. Comment at: clang/include/clang/Driver/ToolChain.h:388 + /// IsRISCVBareMetal - Does this tool chain is a riscv baremetal target. + static bool IsRISCVBareMetal(const llvm::Triple &); + barannikov88 wrote: > manojgupta

[PATCH] D131225: Driver: Refactor and support per target dirs in baremetal

2022-08-08 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added inline comments. Comment at: llvm/lib/Support/Triple.cpp:1936 +bool Triple::isARMBareMetal() const { + if (getArch() != llvm::Triple::arm && getArch() != Triple::thumb) +return false; (nit) at least `llvm::` qualification is redundant,

[PATCH] D131225: Driver: Refactor and support per target dirs in baremetal

2022-08-08 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added inline comments. Comment at: clang/include/clang/Driver/ToolChain.h:388 + /// IsRISCVBareMetal - Does this tool chain is a riscv baremetal target. + static bool IsRISCVBareMetal(const llvm::Triple &); + manojgupta wrote: > barannikov88

[PATCH] D131225: Driver: Refactor and support per target dirs in baremetal

2022-08-08 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added inline comments. Comment at: llvm/include/llvm/ADT/Triple.h:916 + /// Tests if the target is {arm,thumb}-none-none-{eabi,eabihf}. + bool isARMBareMetal() const { +if (getArch() != Triple::arm && getArch() != Triple::thumb) Any future

[PATCH] D131225: Driver: Refactor and support per target dirs in baremetal

2022-08-08 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 accepted this revision. barannikov88 added a comment. This revision is now accepted and ready to land. LGTM with the style issues fixed, but I'd like someone else to take a look. Comment at: clang/lib/Driver/ToolChains/BareMetal.cpp:228-237 + case

[PATCH] D131416: [Clang][BinaryOperator] memoize ICEKind for BinaryOperator Exprs

2022-08-08 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added inline comments. Comment at: clang/include/clang/AST/Expr.h:3832 + llvm::Optional getICEKind() const { return IK; } + Does it need to be Optional? It seems that it is never checked that it does not hold a value except for the setter

[PATCH] D131225: Driver: Refactor and support per target dirs in baremetal

2022-08-08 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added a comment. In D131225#3707735 , @manojgupta wrote: > Address style nits. Neat, thank you! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131225/new/ https://reviews.llvm.org/D131225

[PATCH] D137838: [Support] Move TargetParsers to new component

2022-12-20 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added inline comments. Comment at: llvm/include/llvm/ADT/Triple.h:11 +/// This header is deprecated in favour of +/// `llvm/TargetParser/AArch64TargetParser.h`. /// Invalid comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D137337: Replace LLVM_LIBDIR_SUFFIX by CMAKE_INSTALL_LIBDIR

2022-12-20 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added inline comments. Comment at: bolt/include/bolt/RuntimeLibs/RuntimeLibraryVariables.inc.in:17 -#define LLVM_LIBDIR_SUFFIX "@LLVM_LIBDIR_SUFFIX@" +#define CMAKE_INSTALL_LIBDIR "@CMAKE_INSTALL_LIBDIR@" barannikov88 wrote: > The prefix must

[PATCH] D137337: Replace LLVM_LIBDIR_SUFFIX by CMAKE_INSTALL_LIBDIR

2022-12-20 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added inline comments. Comment at: bolt/include/bolt/RuntimeLibs/RuntimeLibraryVariables.inc.in:17 -#define LLVM_LIBDIR_SUFFIX "@LLVM_LIBDIR_SUFFIX@" +#define CMAKE_INSTALL_LIBDIR "@CMAKE_INSTALL_LIBDIR@" The prefix must remain LLVM_* In other

[PATCH] D140104: [clang][dataflow] Remove unused argument in getNullability

2022-12-16 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:9072 auto GetNullability = [](QualType Ty) { +Optional Kind = Ty->getNullability(); This now gives a warning `clang/lib/Sema/SemaExpr.cpp:9072:27: warning: lambda capture 'Ctx'

[PATCH] D139973: [llvm] Make llvm::Any similar to std::any

2022-12-19 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added inline comments. Comment at: lldb/include/lldb/Core/RichManglingContext.h:90-91 assert(parser.has_value()); -assert(llvm::any_isa(parser)); +assert(llvm::any_cast()); return llvm::any_cast(parser); } This is not

[PATCH] D139973: [llvm] Make llvm::Any similar to std::any

2022-12-19 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added a comment. Just thoughts. llvm::any_isa is usually paired with llvm::any_cast; replacing them with llvm::any_cast and nullptr check seems fine. However, - std::any uses RTTI, so it is unlikely to ever replace llvm::Any. - llvm::any_isa<> is kind of convenient and is aligned

[PATCH] D139973: [llvm] Make llvm::Any similar to std::any

2022-12-19 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added inline comments. Comment at: llvm/lib/Passes/StandardInstrumentations.cpp:193 - if (any_isa(IR)) { -const Function *F = any_cast(IR); -return F->getName().str(); + if (const auto **F = any_cast()) { +return (*F)->getName().str();

[PATCH] D139973: [llvm] Make llvm::Any similar to std::any

2022-12-19 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added a comment. In D139973#4004408 , @jsilvanus wrote: > I just checked on Godbolt that gcc 12.2 with libstdc++, clang 15.0 with both > libstd++ and libc++ and MSVC 19.33 support `std::any` without RTTI. > But gcc and clang do not provide

[PATCH] D140332: [ADT] Alias llvm::Optional to std::optional

2022-12-19 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added inline comments. Comment at: clang/lib/Basic/TargetInfo.cpp:513 if (Opts.MaxBitIntWidth) -MaxBitIntWidth = Opts.MaxBitIntWidth; +MaxBitIntWidth = (unsigned)Opts.MaxBitIntWidth; Nit: C-style casts are generally discouraged (there

[PATCH] D139973: [llvm] Make llvm::Any similar to std::any

2022-12-19 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added a comment. Related: https://reviews.llvm.org/D139974 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139973/new/ https://reviews.llvm.org/D139973 ___ cfe-commits mailing list

[PATCH] D139973: [llvm] Make llvm::Any similar to std::any

2022-12-19 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 accepted this revision. barannikov88 added a comment. In D139973#4005120 , @sebastian-ne wrote: > the question gets wether we want to keep llvm::Any around as a wrapper of > std::any once we can use it (in this case this patch would be

[PATCH] D140332: [ADT] Alias llvm::Optional to std::optional

2022-12-19 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 accepted this revision. barannikov88 added inline comments. Comment at: llvm/lib/CodeGen/RegAllocGreedy.h:83 public: -ExtraRegInfo() = default; +ExtraRegInfo() {} ExtraRegInfo(const ExtraRegInfo &) = delete; bkramer wrote: >

[PATCH] D137517: [TargetParser] Generate the defs for RISCV CPUs using llvm-tblgen.

2022-12-21 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added inline comments. Comment at: llvm/utils/TableGen/RISCVTargetDefEmitter.cpp:16 +#include +namespace llvm { + fpetrogalli wrote: > barannikov88 wrote: > > This [[ > >

[PATCH] D137517: [TargetParser] Generate the defs for RISCV CPUs using llvm-tblgen.

2022-12-21 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added inline comments. Comment at: llvm/utils/TableGen/RISCVTargetDefEmitter.cpp:52 + for (auto : Map) { +const auto = Def.second; +if (Record->isSubClassOf("RISCVProcessorModelTUNE_PROC")) fpetrogalli wrote: > barannikov88 wrote: > >

[PATCH] D140467: [X86][Reduce] Preserve fast math flags when change it. NFCI

2022-12-21 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:14742 Builder.getFastMathFlags().setAllowReassoc(); -return Builder.CreateCall(F, {Ops[0], Ops[1]}); +Value *FAdd = Builder.CreateCall(F, {Ops[0], Ops[1]}); +

[PATCH] D140467: [X86][Reduce] Preserve fast math flags when change it. NFCI

2022-12-21 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:14742 Builder.getFastMathFlags().setAllowReassoc(); -return Builder.CreateCall(F, {Ops[0], Ops[1]}); +Value *FAdd = Builder.CreateCall(F, {Ops[0], Ops[1]}); +

[PATCH] D137517: [TargetParser] Generate the defs for RISCV CPUs using llvm-tblgen.

2022-12-21 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added inline comments. Comment at: llvm/lib/TargetParser/CMakeLists.txt:29 +# LLVMTargetParser. See https://stackoverflow.com/a/25681179 +target_include_directories(LLVMTargetParser PUBLIC $) Will it work if RISC-V target is not compiled-in? This

[PATCH] D141788: [NFC] Use `llvm::enumerate` in llvm/unittests/Object

2023-01-16 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 updated this revision to Diff 489499. barannikov88 added a comment. Use `auto` instead of `const auto &` Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141788/new/ https://reviews.llvm.org/D141788 Files:

[PATCH] D141788: [NFC] Use `llvm::enumerate` in llvm/unittests/Object

2023-01-16 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added a comment. In D141788#4055263 , @MaskRay wrote: > non-reference `auto` shall work better in these cases. Not sure why? Won't Data be copied every iteration? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D141788: [NFC] Use `llvm::enumerate` in llvm/unittests/Object

2023-01-16 Thread Sergei Barannikov 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 rG8a0e0c226018: [NFC] Use `llvm::enumerate` in llvm/unittests/Object (authored by barannikov88). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D141581: [clang] Make clangBasic and clangDriver depend on LLVMTargetParser.

2023-01-16 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added a comment. clangBasic and clangDriver already have a dependency on TargetParser (see LLVM_LINK_COMPONENTS at the beginning of corresponding files). Is that not enough? Will it build if you just remove the additional dependency? Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D141581: [clang] Make clangBasic and clangDriver depend on LLVMTargetParser.

2023-01-16 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added a comment. In D141581#4056503 , @fpetrogalli wrote: > This is because the sources of clangBasic and clangDriver might be compiled > before LLVMTargetParser is ready. ... > Therefore, if we say that clangDriver and clangBasic depend

[PATCH] D141581: [clang] Make clangBasic and clangDriver depend on LLVMTargetParser.

2023-01-16 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added a comment. In D141581#4056671 , @fpetrogalli wrote: > @barannikov88 - I am stuck with an incomplete explanation: Ah, I see. The key point is that standalone build that depends on //installed// LLVM. RISCVTargetParser is a custom

[PATCH] D141788: [NFC] Use `llvm::enumerate` in llvm/unittests/Object

2023-01-15 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 created this revision. Herald added subscribers: s.egerton, simoncook, fedor.sergeev. Herald added a project: All. barannikov88 requested review of this revision. Herald added subscribers: llvm-commits, cfe-commits, pcwang-thead. Herald added projects: clang, LLVM. Repository: rG

[PATCH] D141788: [NFC] Use `llvm::enumerate` in llvm/unittests/Object

2023-01-15 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 updated this revision to Diff 489341. barannikov88 added a comment. Rebase onto main Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141788/new/ https://reviews.llvm.org/D141788 Files: clang/docs/tools/clang-formatted-files.txt

[PATCH] D141968: [NFC] Consolidate llvm::CodeGenOpt::Level handling

2023-01-17 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added inline comments. Comment at: llvm/include/llvm/Support/CodeGen.h:67 + inline std::optional getLevel(IDType ID) { +if (ID < 0 || ID > 3) + return std::nullopt; As I can see, clients do not check for nullopt. Either add checks or

[PATCH] D141968: [NFC] Consolidate llvm::CodeGenOpt::Level handling

2023-01-17 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added inline comments. Comment at: llvm/include/llvm/Support/CodeGen.h:57 + /// Code generation optimization level. + enum Level : IDType { +None = 0, ///< -O0 arsenm wrote: > scott.linder wrote: > > This is ABI breaking, so maybe we

[PATCH] D142459: [clang] Deprecate uses of GlobalObject::getAlignment

2023-01-24 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added inline comments. Comment at: clang/lib/CodeGen/CGCUDANV.cpp:491 new llvm::LoadInst(Var->getType(), ManagedVar, "ld.managed", false, - llvm::Align(Var->getAlignment()), I); +

[PATCH] D142459: [clang] Deprecate uses of GlobalObject::getAlignment

2023-01-24 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added inline comments. Comment at: clang/lib/CodeGen/CGCUDANV.cpp:491 new llvm::LoadInst(Var->getType(), ManagedVar, "ld.managed", false, - llvm::Align(Var->getAlignment()), I); +

[PATCH] D141798: Remove ZeroBehavior of countLeadingZeros and the like (NFC)

2023-01-15 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added a comment. It would be nice to have comments reflecting the new behavior in the case of 0 / max value. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141798/new/ https://reviews.llvm.org/D141798

[PATCH] D141918: WIP: [Clang] Emit 'unwindabort' when applicable.

2023-01-17 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added a comment. I couldn't find an example of creating "resume unwindabort" in the patch series. Is it yet to be done? Could you show a source code example where such an instruction should be generated? (By the frontend or an IR pass.) I couldn't get it from the RFC. Repository:

[PATCH] D141798: Drop the ZeroBehavior parameter from countLeadingZeros and the like (NFC)

2023-01-18 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 accepted this revision. barannikov88 added a comment. This revision is now accepted and ready to land. LGTM Comment at: llvm/include/llvm/Support/MathExtras.h:212 /// Only unsigned integral types are allowed. -/// -/// \param ZB the behavior on an input of 0.

[PATCH] D141968: [NFC] Consolidate llvm::CodeGenOpt::Level handling

2023-01-18 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added inline comments. Comment at: llvm/include/llvm/Support/CodeGen.h:57 + /// Code generation optimization level. + enum Level : IDType { +None = 0, ///< -O0 scott.linder wrote: > barannikov88 wrote: > > arsenm wrote: > > > scott.linder

[PATCH] D142968: [NFC] Extract `CodeGenInstAlias` into its own *.h/*.cpp

2023-01-31 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 created this revision. Herald added a subscriber: jeroen.dobbelaere. Herald added a project: All. barannikov88 requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. Repository: rG LLVM Github Monorepo

[PATCH] D142968: [NFC] Extract `CodeGenInstAlias` into its own *.h/*.cpp

2023-01-31 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added a comment. I intent to make make InstAlias with "complex" operands (non-empty MIOperandInfo) more robust (stricter syntax). The change will clobber most of the code here, and I thought it is a good time to move the class to a dedicated file. Another weak point is that this

[PATCH] D144100: [clang] Fix a bug that allowed some overflowing octal escape sequences

2023-02-16 Thread Sergei Barannikov 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 rG574e417460cd: [clang] Fix a bug that allowed some overflowing octal escape sequences (authored by barannikov88). Repository: rG LLVM Github

[PATCH] D144100: [clang] Fix a bug that allowed some overflowing octal escape sequences

2023-02-16 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 updated this revision to Diff 497915. barannikov88 added a comment. Update the comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144100/new/ https://reviews.llvm.org/D144100 Files: clang/lib/Lex/LiteralSupport.cpp

[PATCH] D148091: [clang][CodeGen] Break up TargetInfo.cpp [3/6]

2023-04-12 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 updated this revision to Diff 512991. barannikov88 added a comment. clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148091/new/ https://reviews.llvm.org/D148091 Files: clang/lib/CodeGen/TargetInfo.cpp Index:

[PATCH] D148094: [DRAFT][clang][CodeGen] Break up TargetInfo.cpp [6/6]

2023-04-20 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added a comment. ping Does the approach look right? Would it be better to put everything into cpp files and only expose a factory method e.g. createMyTargetCodeGenInfo? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148094/new/

[PATCH] D148954: [clang] Make access to submodules via `iterator_range`

2023-04-24 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added inline comments. Comment at: clang/include/clang/Basic/Module.h:744-747 - submodule_iterator submodule_begin() { return SubModules.begin(); } - submodule_const_iterator submodule_begin() const {return SubModules.begin();} - submodule_iterator

[PATCH] D148094: [DRAFT][clang][CodeGen] Break up TargetInfo.cpp [6/6]

2023-04-18 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added a comment. Kindly ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148094/new/ https://reviews.llvm.org/D148094 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D148092: [clang][CodeGen] Break up TargetInfo.cpp [4/6]

2023-04-29 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added a comment. In D148092#4302861 , @efriedma wrote: > Is this supposed to be different from D148093 > ? Yes indeed. I've updated D148093 . Repository: rG LLVM

[PATCH] D148094: [DRAFT][clang][CodeGen] Break up TargetInfo.cpp [6/6]

2023-04-29 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 updated this revision to Diff 518199. barannikov88 added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148094/new/ https://reviews.llvm.org/D148094 Files: clang/lib/CodeGen/ABIInfo.cpp

[PATCH] D148090: [clang][CodeGen] Break up TargetInfo.cpp [2/6]

2023-04-29 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 updated this revision to Diff 518189. barannikov88 added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148090/new/ https://reviews.llvm.org/D148090 Files: clang/lib/CodeGen/TargetInfo.cpp Index:

[PATCH] D148092: [clang][CodeGen] Break up TargetInfo.cpp [4/6]

2023-04-29 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 updated this revision to Diff 518191. barannikov88 added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148092/new/ https://reviews.llvm.org/D148092 Files: clang/lib/CodeGen/TargetInfo.cpp Index:

[PATCH] D148091: [clang][CodeGen] Break up TargetInfo.cpp [3/6]

2023-04-29 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 updated this revision to Diff 518190. barannikov88 added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148091/new/ https://reviews.llvm.org/D148091 Files: clang/lib/CodeGen/TargetInfo.cpp Index:

[PATCH] D148093: [clang][CodeGen] Break up TargetInfo.cpp [5/6]

2023-04-29 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 updated this revision to Diff 518187. barannikov88 added a comment. Upload the correct diff Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148093/new/ https://reviews.llvm.org/D148093 Files: clang/lib/CodeGen/ABIInfo.h

[PATCH] D148089: [clang][CodeGen] Break up TargetInfo.cpp [1/6]

2023-04-29 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 updated this revision to Diff 518188. barannikov88 added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148089/new/ https://reviews.llvm.org/D148089 Files: clang/lib/CodeGen/TargetInfo.cpp Index:

[PATCH] D148094: [DRAFT][clang][CodeGen] Break up TargetInfo.cpp [6/6]

2023-04-29 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 updated this revision to Diff 518264. barannikov88 added a comment. Herald added a project: LLVM. Herald added a subscriber: llvm-commits. - Update references to modified files in non-code files - Add LLVM_LIBRARY_VISIBILITY to classes in header files Repository: rG LLVM Github

[PATCH] D148094: [DRAFT][clang][CodeGen] Break up TargetInfo.cpp [6/6]

2023-04-29 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added a comment. Thank you all for taking a look! In D148094#4296346 , @aaron.ballman wrote: > I did not verify that the refactoring didn't change functionality, but > spot-checking did not find any differences. In D148094#4302879

[PATCH] D149514: Check if First argument in _builtin_assume_aligned_ is of pointer type

2023-04-30 Thread Sergei Barannikov via Phabricator via cfe-commits
barannikov88 added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:7986 + +if (!firstArgType->isAnyPointerType()) { + QualType expectedType = Context.getPointerType(firstArgType); barannikov88 wrote: > Instead of directly checking for the

  1   2   3   >