- Jan 27, 2023
-
-
Quentin Colombet authored
Since the recent MemRef refactoring that centralizes the lowering of complex MemRef operations outside of the conversion framework, the MemRefToLLVM pass doesn't directly convert these complex operations. Instead, to fully convert the whole MemRef dialect space, MemRefToLLVM needs to run after `expand-strided-metadata`. Make this more obvious by changing the name of the pass and the option associated with it from `convert-memref-to-llvm` to `finalize-memref-to-llvm`. The word "finalize" conveys that this pass needs to run after something else and that something else is documented in its tablegen description. This is a follow-up patch related to the conversation at: https://discourse.llvm.org/t/psa-you-need-to-run-expand-strided-metadata-before-memref-to-llvm-now/66956/14 Differential Revision: https://reviews.llvm.org/D142463
-
Alex Zinenko authored
Previously, the CallOpSignatureConversion pattern would assert if function signature change affected the number of results. Fail the pattern instead and let the caller propagate failure. Fixes #60186. Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D142624
-
Evgeniy Brevnov authored
This reverts commit 26e7cb24.
-
Andrzej Warzynski authored
It is possible that the input to the Linalg vectorizer contains `affine.apply` ops (see the example in [1]). Such operations are not vectarizable at the moment, but this can be fixed by simply converting them to arithmetic operations. This is basically what this patch introduces. The IR change enabled in this patch could be part of a larger set of "linalgOp pre-processing" transformations that happens right before vectorization starts but after we know we can vectorize the op. I am leaving this as a TODO. [1] https://github.com/iree-org/iree/issues/10876. Differential Revision: https://reviews.llvm.org/D142371
-
Timm Bäder authored
in Function::dump().
-
Timm Bäder authored
We already do an isPrimitiveArray() check, so no need for the isArray() check.
-
Evgeniy Brevnov authored
Currently, JT creates and updates local instances of BPI\BFI. As a result global ones have to be invalidated if JT made any changes. In fact, JT doesn't use any information from BPI/BFI for the sake of the transformation itself. It only creates BPI/BFI to keep them up to date. But since it updates local copies (besides cases when it updates profile metadata) it just waste of time. Current patch is a rework of D124439. D124439 makes one step and replaces local copies with global ones retrieved through AnalysisPassManager. Here we do one more step and don't create BPI/BFI if the only reason of creation is to keep BPI/BFI up to date. Overall logic is the following. If there is cached BPI/BFI then update it along the transformations. If there is no existing BPI/BFI, then create it only if it is required to update profile metadata. Please note if BPI/BFI exists on exit from JT (either cached or created) it is always up to date and no reason to invalidate it. Reviewed By: mkazantsev Differential Revision: https://reviews.llvm.org/D136827
-
Timm Bäder authored
Change GetPtrBase to *not* pop the base pointer and add a *Pop variant. This will be used in later patches.
-
Timm Bäder authored
Just ignore it. As part of this, move the Ret and RetVoid implementation to Interp.h, so they can be shared with InterpBuiltin.cpp. Differential Revision: https://reviews.llvm.org/D141193
-
Shilei Tian authored
When `N` is 1024, `int result[N][N]` is obviously large stack that Windows cannot support... Fix #60326. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D142684
-
Michael Buch authored
Suggested in https://reviews.llvm.org/D140030
-
Michael Buch authored
Fixes build failures caused by a faulty rebase in `a29e06bb` Differential Revision: https://reviews.llvm.org/D140030
-
Michael Buch authored
Differential Revision: https://reviews.llvm.org/D142653
-
Michael Buch authored
**Summary** This patch makes LLDB understand the `DW_AT_default_value` on template argument DIEs. As a result, type summaries will no longer contain the defaulted template arguments, reducing noise substantially. E.g., Before: ``` (lldb) v nested (std::vector<std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::allocator<std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator <char> > > > > >) nested = size=0 {} ``` After: ``` (lldb) v nested (std::vector<std::vector<std::basic_string<char> > >) nested = size=0 {} ``` See discussion in https://reviews.llvm.org/D140423 **Testing** * Adjust API tests * Added unit-test Differential Revision: https://reviews.llvm.org/D141828 -
Michael Buch authored
This patch makes the members of `TemplateParameterInfos` only accessible via public APIs. The motivation for this is that `TemplateParameterInfos` attempts to maintain two vectors in tandem (`args` for the template arguments and `names` for the corresponding name). Working with this structure as it's currently designed makes it easy to run into out-of-bounds accesses later down the line. This patch proposes to introduce a new `TemplateParameterInfos::InsertArg` which is the only way to set the `TemplateArgument` and name of an entry and since we require both to be specified we maintain the vectors in sync out-of-the-box. To avoid adding non-const getters just for unit-tests a new `TemplateParameterInfosManipulatorForTests` is introduced that can be used to control internal state from tests.
-
Michael Buch authored
Since `ClassTemplateSpecializationDecl`s now set the `TemplateArgument::IsDefaulted` bit, there's no need to derive it here. Differential Revision: https://reviews.llvm.org/D142333
-
Michael Buch authored
**Summary** This patch allows clients who can't properly construct a `ClassTemplateDecl` to still benefit from the `clang::TypePrinter`s ability to skip printing defaulted template arguments. The clients simply have to call `TemplateArgument::setIsDefaulted` in advance. See discussion in https://reviews.llvm.org/D140423 Differential Revision: https://reviews.llvm.org/D141827
-
Michael Buch authored
**Summary** This patch adds a `IsDefaulted` field to `clang::TemplateArgument`. To prevent memory footprint increase we still 1 bit from `ArgKind`. **Changes** 1. `getIsDefaulted`/`setIsDefaulted` to allow clients to communicate an argument's defaulted-ness to the TypePrinter 2. The `TemplateArgument` properties description had to be changed to make sure we correctly mark the defaulted-ness of arguments that came from a deserialized AST (caught by the HLSL test-suite) 3. The `TemplateArgument` constructors now accept a `IsDefaulted` parameter to simplify construction from the tablegen description. Though if people don't want to clutter the constructors we can instead call `setIsDefaulted` from tablegen 4. When `clang::Sema` checks the template arguments against template parameters we now call `setIsDefaulted`. This makes sure that whenever a specialization decl gets constructed, the defaulted-ness of the associated `TemplateArgument`s has already been deduced. This preserves the immutability of `TemplateArgumentList`s **Background** In LLDB we construct ASTs from debug-info and hand it to clang to perform actions such as printing/formatting a typenames. Some debug formats, specifically DWARF, may only encode information about class template instantiations, losing the structure of the generic class definition. However, the `clang::TypePrinter` needs a properly constructed `ClassTemplateDecl` with generic default argument decls to be able to deduce whether a `ClassTemplateSpecializationDecl` was instantiatiated with `TemplateArgument`s that correspond to the defaults. LLDB does know whether a particular template argument was defaulted, but can't currently tell clang about it. This patch allows LLDB to set the defaulted-ness of a `TemplateArgument` and thus benefit more from `clang::TypePrinter`. See discussion in https://reviews.llvm.org/D140423 **Testing** * Added unit-test * LLDB/clang/llvm test-suite passes Differential Revision: https://reviews.llvm.org/D141826
-
Michael Buch authored
This patch adds support for `TemplateArgument`s of kind `TemplateArgument::Expression` to `clang::isSubstitutedDefaultArgument`. We do so by evaluating both the `Pattern` and `Arg` expression to an `APInt`, if we can, and comparing the results. This will be useful in an upcoming change where `clang::isSubstitutedDefaultArgument` gets called from `clang::Sema` where the `TemplateArgument`s are instantiated as expressions (without being evaluted to `APInt` beforehand). **Testing** - Added unit-tests Differential Revision: https://reviews.llvm.org/D142632
-
Jordan Rupprecht authored
-
Phoebe Wang authored
This patch is inspired by D111433. It would affect the performance under strict FP mode. But it preserves the correct rounding behavior accross function calls. Fixes #59305 Reviewed By: sepavloff Differential Revision: https://reviews.llvm.org/D139549
-
Jordan Rupprecht authored
-
Emilia Dreamer authored
There should not be any cases where the angle brackets of template parameters are directly followed by a literal. It is more likely that a comparison is taking place instead. This patch makes the TokenAnnotator prefer to annotate < and > as operators when directly followed by a literal. A similar check already exists for literals directly *before* potential template args. Fixes https://github.com/llvm/llvm-project/issues/60140 Reviewed By: HazardyKnusperkeks, owenpan, MyDeveloperDay Differential Revision: https://reviews.llvm.org/D142139
-
Hanhan Wang authored
Reviewed By: mravishankar Differential Revision: https://reviews.llvm.org/D141977
-
Jez Ng authored
By using emplace_back, as well as converting some loops to for-each, we can do more efficient vectorization. Make copy constructor for TemporaryFile noexcept. Reviewed By: #lld-macho, int3 Differential Revision: https://reviews.llvm.org/D139552
-
Tom Stellard authored
Reviewed By: amyk, dim, hans Differential Revision: https://reviews.llvm.org/D142417
-
Jordan Rupprecht authored
This test manually sends `terminateCommands` to shutdown, but then the test attempts another `terminateCommands` request in test tear down, which fails since it's already torn down. This error is ignored in LLDB's old fork of unittest2, but will be reported as a test failure in `unittest` from the Python standard library. Use `disconnectAutomatically` to avoid terminating twice.
-
Benjamin Kramer authored
-
Slava Zakharin authored
CheckDoConcurrentClauseRestriction and CheckTileClauseRestriction expect that the construct has associated DoConstruct, while it is not set when the do-loop has no loop control. The change is to skip the clauses checks, when the do-loop does not have the loop control. An alternative fix would be to associate the DoConstruct even when the do-loop has no loop control and let Check*ClauseRestriction run their checks, but I am not sure if associating invalid DoConstruct is a good idea. This fixes failure in Semantics/OpenACC/acc-canonicalization-validity.f90 reported in D142279. Reviewed By: clementval Differential Revision: https://reviews.llvm.org/D142652
-
Slava Zakharin authored
This fixes unittest failures reported in D142279: flang-Unit :: Frontend/./FlangFrontendTests/5/7 flang-Unit :: Frontend/./FlangFrontendTests/6/7
-
Nicolas Vasilache authored
This PR adds a `pack_greedily` transform operation that infers the packing for gemm subcomputations embedded within in any LinalgOp and packs accordingly. A normalization step guarantees that we get the innermost op dimensions in one of `8` possible `(m, n, k)` orders, specified as a parameter, from which we can emit all packed forms. The current implementation takes an arbitrary LinalgOp and tries to pack it along the specified dimensions with specified sizes and inner dim permutation. This achieves a new level of normalization and generalization for any `n-D` LinalgOp that contains a gemm embedded within it: we will always see a predictable packed form for any of these ops. Differential Revision: https://reviews.llvm.org/D142661
-
Elizabeth Andrews authored
-
Dominik Adamski authored
Currently default simd alignment is defined by Clang specific TargetInfo class. This class cannot be reused for LLVM Flang. That's why default simd alignment calculation has been moved to OMPIRBuilder which is common for Flang and Clang. Previous attempt: https://reviews.llvm.org/D138496 was wrong because the default alignment depended on the number of built LLVM targets. If we wanted to calculate the default alignment for PPC and we hadn't specified PPC LLVM target to build, then we would get 0 as the alignment because OMPIRBuilder couldn't create PPCTargetMachine object and it returned 0 as the default value. If PPC LLVM target had been built earlier, then OMPIRBuilder could have created PPCTargetMachine object and it would have returned 128. Differential Revision: https://reviews.llvm.org/D141910 Reviewed By: jdoerfert
-
Joseph Huber authored
Summary: Clang doesn't warn on `-B` options passed to it. This one is not forwarded to the linker which results in some tests failing when offloading to x86_64 with the `bfd` linker.
-
Daniel Thornburgh authored
Reviewed By: gulfem Differential Revision: https://reviews.llvm.org/D136702
-
WuXinlong authored
This patch add the instructions of Zcb extension. Instructions in zcb extensions shorten part of bit manipulation instructions. Co-authored-by:
Craig Topper <craig.topper@sifive.com> Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D131141
-
Kazu Hirata authored
This patch removes findFirstSet and findLastSet as there are no uses left in LLVM. I am not aware of any uses of findFirstSet and findLastSet in the open-source world outside LLVM, so I am skipping the deprecation step. Differential Revision: https://reviews.llvm.org/D142603
-
Mike Hommey authored
This strips out about 5k symbols. Fixes https://github.com/llvm/llvm-project/issues/60109 Reviewed By: john.brawn Differential Revision: https://reviews.llvm.org/D142431
-
Louis Dionne authored
Differential Revision: https://reviews.llvm.org/D142566
-
LLVM GN Syncbot authored
-