- Jun 12, 2024
-
-
Maksim Levental authored
This fixes downstream builds.
-
Sergio Afonso authored
This patch adds support for lowering the OpenMP DISTRIBUTE directive from PFT to MLIR. It only supports standalone DISTRIBUTE, support for composite constructs will come in follow-up PRs.
-
Stephen Tozer authored
Reverted due to a link error on the buildbots. This reverts commit 297b6dea.
-
Stephen Tozer authored
The Flang frontend currently prints LLVM IR modules using llvm::Module::print(); this works for default cases, but skips some of the logic that IR printer passes use, specifically the use of the --write-experimental-debuginfo flag to control debug info format. This patch replaces the use of print() with the PrintModulePass, bringing the printing behaviour to parity with clang's frontend.
-
Nikita Popov authored
This header is split off from GenericDomTree.h so it can be included in the source file only. Do this for MachineDominators.h and MachinePostDominators.h.
-
Nikita Popov authored
This exposes a miscompile reported in https://github.com/llvm/llvm-project/issues/95152. Whether the new inference or MemCpyOpt is at fault depends on the precise semantics of writeonly attributes. Revert the patch while this is being pinned down. This reverts commit 285dbed1. This reverts commit cda5790e.
-
Nikita Popov authored
This depends on multiple passes agreeing on the semantics of writeonly, so add a PhaseOrdering test for it.
-
Ramkumar Ramachandra authored
Follow up on 76030dc1 (mlir/Presburger/MPInt: move into llvm/ADT) to guard a function in Fraction.h with !NDEBUG || LLVM_ENABLE_DUMP, since the call to the corresponding function in DynamicAPInt is guarded similarly. This patch fixes the build when mlir is built with this configuration.
-
Nikita Popov authored
This reverts commit 3b3b839c. This broke the flang+openmp+offload buildbot, as reported in https://github.com/llvm/llvm-project/pull/95126#issuecomment-2162424019.
-
Scott Egerton authored
The s_singleuse_vdst instruction is used to mark regions of instructions that produce values that have only one use. Certain instructions take more than one cycle to execute, resulting in regions being incorrectly marked. This patch excludes these multi-cycle instructions from being marked as either producing single use values or consuming single use values or both depending on the instruction.
-
wanglei authored
Reviewed By: SixWeining Pull Request: https://github.com/llvm/llvm-project/pull/92483
-
Kerry McLaughlin authored
-
Pierre van Houtryve authored
All values are small so no reason to ever use SmallSet really. In large programs we'll end up using std::set which is extremely slow compared to DenseSet. This brings a decent speedup to the pass in large programs.
-
Michael Buch authored
This is an attempt at displaying the work that's being done by LLDB when waiting on type-completion events, e.g., when running an expression. This patch adds a single new progress event for cases where we search for the definition DIE of a forward declaration, which can be an expensive operation in the presence of many object files.
-
Braden Helmer authored
Implements -Wmissing-include-dirs #92015 This is my first contribution and would love some feedback. Thanks!
-
Matt Arsenault authored
The ptrmask intrinsic requires the integer mask to be the index size, not the pointer size.
-
Matt Arsenault authored
-
Kerry McLaughlin authored
[AArch64][compiler-rt] Disable SME ABI routines if function multiversioning is not supported (#94973) This prevents build failures when building with `DISABLE_AARCH64_FMV`, see https://github.com/llvm/llvm-project/pull/92921.
-
Michael Buch authored
This patch prevents passing a `nullptr` to the `std::string` constructor in `GetString`. This prevents UB arising from calling `GetString` on a default-constructed `ConstString`.
-
Michael Buch authored
This patch moves some of the `is_cxx_method`/`objc_method` logic out of `DWARFASTParserClang::ParseSubroutine` into their own functions. Mainly the purpose of this is to (hopefully) make this function more readable by turning the deeply nested if-statements into early-returns. This will be useful in an upcoming change where we remove some of the branches of said if-statement. Considerations: * Would be nice to make them into static helpers in `DWARFASTParserClang.cpp`. That would require them take few more arguments which seemed to get unwieldy. * `HandleCXXMethod` can return three states: (1) found a `TypeSP` we previously parsed (2) successfully set a link between the DIE and DeclContext (3) failure. One could express this with `std::optional<TypeSP>`, but then returning `std::nullopt` vs `nullptr` becomes hard to reason about. So I opted to return `std::pair<bool, TypeSP>`, where the `bool` indicates success and the `TypeSP` the cached type. * `HandleCXXMethod` takes `ignore_containing_context` as an output parameter. Haven't found a great way to do this differently
-
Nikita Popov authored
OffAccum will never be nullptr now, instead check for a zero constant.
-
Matt Arsenault authored
Note pointers still don't work correctly.
-
LLVM GN Syncbot authored
-
Ramkumar Ramachandra authored
MPInt is an arbitrary-precision integer library that builds on top of APInt, and has a fast-path when the number fits within 64 bits. It was originally written for the Presburger library in MLIR, but seems useful to the LLVM project in general, independently of the Presburger library or MLIR. Hence, move it into LLVM/ADT under the name DynamicAPInt. This patch is part of a project to move the Presburger library into LLVM.
-
Hugo Trachino authored
Implements `TransferOpReduceRank` as a `MaskableOpRewritePattern`. Allowing to exit gracefully when run on a `vector::transfer_read` located inside a `vector::MaskOp` instead of generating `error: 'vector.mask' op expects only one operation to mask` because the pattern generated multiple ops inside the MaskOp. Split of https://github.com/llvm/llvm-project/pull/90835
-
Owen Pan authored
Fixes #95072.
-
Timm Bäder authored
We need to use isConstant() here, isConstQualified() is not enough.
-
Nikita Popov authored
Use emitGEPOffset() to emit the GEP offset, which already has all the necessary logic. This also fixes the nuw flag incorrectly being set on the offset calculation, while only nsw is implied by inbounds.
-
Nikita Popov authored
This is a followup to https://github.com/llvm/llvm-project/pull/93823 and drops the DataLayout-unaware GEP of GEP fold entirely. All cases are now left to the DataLayout-aware constant folder, which will fold everything to a single i8 GEP. We didn't have any test coverage for this fold in LLVM, but some Clang tests change.
-
jeanPerier authored
Fixes https://github.com/llvm/llvm-project/issues/61610.
-
The Phantom Derpstorm authored
This commit implements the entirety of the now-accepted [N3017 - Preprocessor Embed](https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3017.htm) and its sister C++ paper [p1967](https://wg21.link/p1967 ). It implements everything in the specification, and includes an implementation that drastically improves the time it takes to embed data in specific scenarios (the initialization of character type arrays). The mechanisms used to do this are used under the "as-if" rule, and in general when the system cannot detect it is initializing an array object in a variable declaration, will generate EmbedExpr AST node which will be expanded by AST consumers (CodeGen or constant expression evaluators) or expand embed directive as a comma expression. --------- Co-authored-by:
Aaron Ballman <aaron@aaronballman.com> Co-authored-by:
cor3ntin <corentinjabot@gmail.com> Co-authored-by:
H. Vetinari <h.vetinari@gmx.com> Co-authored-by:
Podchishchaeva, Mariya <mariya.podchishchaeva@intel.com>
-
Andrzej Warzyński authored
The main goal of this PR (and subsequent PRs), is to add more tests with scalable vectors to: * vector-transfer-collapse-inner-most-dims.mlir Changes in this PR: 1. Renamed `@contiguous_inner_most_dim_bounds` as `@contiguous_inner_most_dim_with_subview`. This test was introduced to make sure that the `in_bounds` attribute is correctly preserved, but that's already verified by some earlier tests. The updated name highlights the differentiating factor of this test when compared to the other tests _currently_ present in the file, i.e. the presence of `memref.subview` in the input IR. 2. Renamed `@contiguous_inner_most_dim_out_of_bounds_2d` as `@negative_non_unit_inner_vec_dim`. While this test does contain an out-of-bounds access, the actual reason for the tested pattern to fail is the fact that the inner dim in the output vector is not "1". A complimentary test was added to verify that the pattern also fails when the source memref has non-unit trailing dim (`@negative_non_unit_inner_memref_dim`). 3. Renamed `@contiguous_inner_most_dim` as `@contiguous_inner_most_dim_non_zero_idxs` - this test verifies that the pattern works in the presence of non-zero idxs. 4. Added more tests for scalable vectors - this should cover all cases for `vector.transfer_read`. NOTE: This PR is limited to tests for `vector.transfer_read`. Follow-up for: #94490
-
Carl Ritson authored
This does not work correctly in divergent control flow. Can be replaced with a later exec mask manipulation optimizer. This reverts commit a3646ec1.
-
Monad authored
Specification link: https://github.com/riscv/riscv-isa-manual/blob/main/src/indirect-csr.adoc Some CSRs (`*ireg` and `*iselect`) in Smcsrind/Sscsrind extensions are originally defined as part of the Smaia/Ssaia extensions and are already supported in LLVM. The missing CSRs (`*ireg2` to `*ireg6` for `m`, `s`, and `vs`) are added in this PR.
-
paperchalice authored
`MachinePostDominators` version of #94571.
-
Johannes de Fine Licht authored
The `noinline`, `alwaysinline`, and `optnone` function attributes are already being used in MLIR code for the LLVM inlining interface and in some SPIR-V lowering, despite residing in the passthrough dictionary, which is intended as exactly that -- a pass through MLIR -- and not to model any actual semantics being handled in MLIR itself. Promote the `noinline`, `alwaysinline`, and `optnone` attributes out of the passthrough dictionary on `llvm.func` into first class unit attributes, updating the import and export accordingly. Add a verifier to `llvm.func` that checks that these attributes are not set in an incompatible way according to the LLVM specification. Update the LLVM dialect inlining interface to use the first class attributes to check whether inlining is possible.
-
Timm Bäder authored
-
aengelke authored
Cleanup after AMXProgModel introduction. AMXProgModel is ManagedRA whenever virtual tile registers exist at some point.
-
aengelke authored
Follow-up of #94358. Do the checks even before calling getRegisterInfo etc., because some of these are virtual function calls.
-
Vitaly Buka authored
Default intrinsic handling was to report any uninitialized part of argument. However intrinsics use mask which allow to ignore parts of input, so it's OK to have vectors partially initialized.
-