- Oct 06, 2023
-
-
Petar Avramovic authored
Temporal divergence that was present in input or introduced in IR transforms, like code-sinking or LICM, is handled in SIFixSGPRCopies by changing sgpr source instr to vgpr instr. After 5b657f50, that moved LICM after AMDGPUCodeGenPrepare, machine-sinking can introduce temporal divergence by sinking instructions outside of the cycle. Add isSafeToSink callback in TargetInstrInfo.
-
Petar Avramovic authored
Introduced by 5b657f50 that moved LICM after AMDGPUCodeGenPrepare. Some instructions are no longer sunk during ir optimizations but in machine-sinking instead. If vgpr instruction used sgpr defined inside the cycle is sunk outside of the cycle we end up with not-handled case of temporal divergence. Add test for theoretical case when SALU instruction (represents uniform value) is sunk outside of the cycle. Add a test when SALU instruction can be sunk if it edits lane mask.
-
Petar Avramovic authored
This reverts commit 3f8ef57b.
-
Yingwei Zheng authored
This patch folds the pattern `a ne/eq (zext/sext (a ne/eq c))` into a boolean constant or a compare. Clang vs GCC: https://godbolt.org/z/4ro817WE8 Proof for `zext`: https://alive2.llvm.org/ce/z/6z9NRF Proof for `sext`: https://alive2.llvm.org/ce/z/tv5wuE Fixes #65073.
-
Sander de Smalen authored
-
Christian Sigg authored
[mlir][bazel] Fix after https://github.com/llvm/llvm-project/commit/ef8c26b7728c4417ffdaea8b633ceebf0adb292d
-
Yingwei Zheng authored
-
Simon Pilgrim authored
These were missed as I didn't expect clang codegen to be updated
-
Nicolas Vasilache authored
[mlir][Transform] Provide a minimal set of utils that allow implementing a simple transform dialect interpreter pass (#68330)
-
Jie Fu authored
/llvm-project/llvm/include/llvm/CodeGen/BasicTTIImpl.h:948:33: error: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Werror,-Wsign-compare] (Index + Mask.size()) <= NumSrcElts) { ~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~ -
Christian Sigg authored
[mlir][bazel] Fix after https://github.com/llvm/llvm-project/commit/6a2071cc6a129dfe645ef4743fda78e76d748f16 Second try...
-
Christian Sigg authored
[mlir][bazel] Fix after https://github.com/llvm/llvm-project/commit/6a2071cc6a129dfe645ef4743fda78e76d748f16
-
Vlad Serebrennikov authored
While working on #68377 inspecting `Allocate()` calls, I found out that there are couple of places where we forget to use placement-new to create objects in the allocated memory.
-
Aaron Ballman authored
Revert "Revert "Fixes and closes #53952. Setting the ASTHasCompilerErrors member variable correctly based on the PP diagnostics. (#68127)"" This reverts commit a6acf3fd and relands a50e63b3. The original revert was done by mistake.
-
Sander de Smalen authored
Instead of RDSVL * RDSVL.
-
Dmitriy Smirnov authored
This patch tries to canonicalise add + gep to gep + gep. Co-authored-by:
Paul Walker <paul.walker@arm.com> Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D155688
-
Simon Pilgrim authored
-
Simon Pilgrim authored
Allow length changing shuffle masks in the "bitcast (shuf V, MaskC) --> shuf (bitcast V), MaskC'" fold. It also exposes some poor shuffle mask detection for extract/insert subvector cases inside improveShuffleKindFromMask First stage towards addressing Issue #67803
-
Simon Pilgrim authored
Made these TODO instead of negative
-
Ingo Müller authored
The transfrom interpreter accepts an argument to a "library" file with named sequences. This patch exteneds this functionality such that (1) several such individual files are accepted and (2) folders can be passed in, in which all `*.mlir` files are loaded.
-
Michael Buch authored
Fixes misleading comment introduced in `f74aaca6`
-
Ben Shi authored
Some large AVR programs (for devices without long jump) may exceed 128KiB, and lld should give explicit errors other than generate wrong executables silently.
-
Krasimir Georgiev authored
This reverts commit 0687e4d9. Causes LLDB failures: https://reviews.llvm.org/D101206#4653253
-
Uday Bondhugula authored
-
Matthias Springer authored
Extend `bufferization.materialize_in_destination` to support memref destinations. This op can now be used to indicate that a tensor computation should materialize in a given buffer (that may have been allocated by another component/runtime). The op still participates in "empty tensor elimination". Example: ```mlir func.func @test(%out: memref<10xf32>) { %t = tensor.empty() : tensor<10xf32> %c = linalg.generic ... outs(%t: tensor<10xf32>) -> tensor<10xf32> bufferization.materialize_in_destination %c in restrict writable %out : (tensor<10xf32>, memref<10xf32>) -> () return } ``` After "empty tensor elimination", the above IR can bufferize without an allocation: ```mlir func.func @test(%out: memref<10xf32>) { linalg.generic ... outs(%out: memref<10xf32>) return } ``` This change also clarifies the meaning of the `restrict` unit attribute on `bufferization.to_tensor` ops. -
philnik777 authored
-
Nikolas Klauser authored
Reviewed By: #libc, ldionne Spies: ldionne, Mordante, libcxx-commits Differential Revision: https://reviews.llvm.org/D155411
-
elhewaty authored
- Add test coverage for sext/zext boolean additions - [InstCombine] Fold comparison of adding two z/sext booleans Fixes https://github.com/llvm/llvm-project/issues/64859.
-
Christian Sigg authored
[mlir][bazel] Disable test added in https://github.com/llvm/llvm-project/commit/787689943d027b062274f22097e7f30b0a52bd5b
-
Nikolas Klauser authored
Adding additional instantiations to the dylib isn't actually an ABI break as long as programs targeting an older dylib don't start to depend on them. Making additional instantiations a matter of availability allows us to add them without an ABI break. Reviewed By: #libc, ldionne, Mordante Spies: arichardson, ldionne, Mordante, libcxx-commits Differential Revision: https://reviews.llvm.org/D154796
-
Christian Sigg authored
[mlir] Fix unused `from` after https://github.com/llvm/llvm-project/commit/787689943d027b062274f22097e7f30b0a52bd5b
-
Ingo Müller authored
Until now, the interpreter would only load those symbols from the provided library files that were declared in the main transform module. However, sequences in the library may include other sequences on their own. Until now, if such sequences were not *also* declared in the main transform module, the interpreter would fail to resolve them. Forward declaring all of them is undesirable as it defeats the purpose of encapsulation into library modules. This PR implements a kind of linker for transform scripts to solve this problem. The linker merges all symbols of the library module into the main module before interpreting the latter. Symbols whose names collide are handled as follows: (1) if they are both functions (in the sense of `FunctionOpInterface`) with compatible signatures, one is external, and the other one is public, then they are merged; (2) of one of them is private, that one is renamed; and (3) an error is raised otherwise. One consequence of this change is that the loading of the library files in the interpreter pass is not idempotent anymore, i.e., subsequent interpreter passes cannot (and need not) load the same library files again since would lead to doubly defined symbols.
-
Clement Courbet authored
…. (#67776)" Now that `scudo` issues have been fixed (#68273). This reverts commit 462bdd5bf0861a27f451f7917802a954e2046bc7.
-
Guray Ozen authored
-
Momchil Velikov authored
This re-applies commit ace20e24, which was reverted in eff4ef25. The issues were fixed in: * b30765ca [AArch64] Fix an incorrect handling of debug values in MachineSink (#68107) * b454b04d [AArch64] Fix a compiler crash in MachineSink (#67705)
-
Michael Buch authored
**Background** Prior to DWARFv4, there was no clear normative text on how to handle static data members. Non-normative text suggested that compilers should use `DW_AT_external` to mark static data members of structrues/unions. Clang does this consistently. However, GCC doesn't, e.g., when the structure/union is in an anonymous namespace (which is C++ standard conformant). Additionally, GCC never emits `DW_AT_data_member_location`s for union members (regardless of storage linkage and storage duration). Since DWARFv5 (issue 161118.1), static data members get emitted as `DW_TAG_variable`. LLDB used to differentiate between static and non-static members by checking the `DW_AT_external` flag and the absence of `DW_AT_data_member_location`. With [D18008](https://reviews.llvm.org/D18008) LLDB started to pretend that union members always have a `0` `DW_AT_data_member_location` by default (because GCC never emits these locations). In [D124409](https://reviews.llvm.org/D124409) LLDB stopped checking the `DW_AT_external` flag to account for the case where GCC doesn't emit the flag for types in anonymous namespaces; instead we only check for presence of `DW_AT_data_member_location`s. The combination of these changes then meant that LLDB would never correctly detect that a union has static data members. **Solution** Instead of unconditionally initializing the `member_byte_offset` to `0` specifically for union members, this patch proposes to check for both the absence of `DW_AT_data_member_location` and `DW_AT_declaration`, which consistently gets emitted for static data members on GCC and Clang. We initialize the `member_byte_offset` to `0` anyway if we determine it wasn't a static. So removing the special case for unions makes this code simpler to reason about. Long-term, we should just use DWARFv5's new representation for static data members. Fixes #68135
-
Diana Picus authored
Teach the si-fix-sgpr-copies pass to deal with REG_SEQUENCE, PHI or INSERT_SUBREG where the result is an SGPR, but some of the inputs are constants materialized into VGPRs. This may happen in cases where for instance several instructions use an immediate zero and SelectionDAG chooses to put it in a VGPR to satisfy all of them. This however causes the si-fix-sgpr-copies to try to switch the whole chain to VGPR and may lead to illegal VGPR-to-SGPR copies. Rematerializing the constant into an SGPR fixes the issue. This was originally reverted because it triggered an unrelated bug in PEI on one of the OpenMP buildbots. That bug has been fixed in #68299, so it should be ok to try again.
-
MarcoFalke authored
-
Timm Baeder authored
isRVVType() is suprisingly expensive, so do the checks only if the target has rvv types.
-
oltolm authored
Fixes #39455.
-