- May 22, 2023
-
-
Alex Bradbury authored
-
Dmitry Makogon authored
This fixes assertion crash in https://github.com/llvm/llvm-project/issues/62380. In the beginning of ScalarEvolution::getBackedgeTakenInfo we make sure that BackedgeTakenCounts contains an entry for the given loop. Then we call computeBackedgeTakenCount which computes the result, and in the end we insert it in the map like so: return BackedgeTakenCounts.find(L)->second = std::move(Result); So we expect that the entry for L still exists in the cache. However, it can get deleted. When it has computed the result, getBackedgeTakenInfo clears all the cached SCEVs that use the AddRecs in the loop. In the crashing example, getBackedgeTakenInfo first gets called on an inner loop, and during this call it gets called again on its parent loop. This recursion happens after the call to computeBackedgeTakenCount. And it happens so that some SCEV from the BTI of the child loop uses an AddRec of the parent loop. So when we successfully compute BTI for the parent loop, we erase already computed result for the child one. The recursion happens in some debug only code that updates statistics. The algorithm itself is non-recursive. Namely the recursive call happens in BackedgeTakenInfo::getExact function and its return value is only used to compare it against SCEVCouldNotCompute. As suggested by nikic I replaced the NumTripCountsComputed and NumTripCountsNotComputed with NumExitCountsComputed and NumExitCountsNotComputed respectively. They are updated during computations made for single exits. It relieves us of the need to compute exact exit count for the loop just to update the named statistic and thus the recursion cannot happen anymore. Differential Revision: https://reviews.llvm.org/D149251
-
Luke Lau authored
For a GEP in a pointer chain, if: 1) a pointer chain is unit-strided 2) the base pointer wasn't folded and is sitting in a register somewhere 3) the distance between the GEP and the base pointer is small enough and can be folded into the addressing mode of the using load/store Then we can exclude that GEP from the total cost of the pointer chain, as it will likely be folded away. In order to check if 3) holds, we need to know the type of memory access being made by the users of the pointer chain. For that, we need to pass along a new argument to getPointersChainCost. (Using the source pointer type of the GEP isn't accurate, see https://reviews.llvm.org/D149889 for more details). Also note that 2) is currently an assumption, and could be modelled more accurately. This prevents some unprofitable cases from being SLP vectorized on RISC-V by making the scalar costs cheaper and closer to the actual codegen. For now the getPointersChainCost hook is duplicated for RISC-V to prevent disturbing other targets, but could be merged back in and shared with other targets in a following patch. Reviewed By: ABataev Differential Revision: https://reviews.llvm.org/D149654
-
Leandro Lupori authored
Add support for representing array constants of any rank with MLIR dense attribute. This greatly improves compile time and memory usage of programs with large array constants. We still support only arrays of a few basic types, such as integer, real and logic. Fixes https://github.com/llvm/llvm-project/issues/60376 Reviewed By: jeanPerier Differential Revision: https://reviews.llvm.org/D150686
-
Andrew Gozillon authored
Revert "Revert "[Flang][OpenMP][MLIR] Add declare target attribute set and interface for the OpenMP dialect"" This reverts commit aa6b47cd. And adds a fix (adding missing libraries to CMakeLists.txt for the OpenMPDialect) that allows failing builds to succeed.
-
Matthias Springer authored
The op bufferizes similarly to tensor.generate: it is lowered to a linalg.map, which may then lower to a loop nest that fills the buffer. Differential Revision: https://reviews.llvm.org/D150952
-
Martin Braenne authored
The crash was due to unconditionally calling `Block.succ_begin()->getReachableBlock()->hasNoReturnElement()`, but `getReachableBlock()` can return null now that we have turned `PruneTriviallyFalseEdges` on. This patch adds two tests that crash without the fix. Reviewed By: ymandel Differential Revision: https://reviews.llvm.org/D151071
-
Aaron Ballman authored
Arrays and their element types are identically qualified as of C2x, and we support that behavior as far back as C89. As a drive-by, this adds the paper number for designated initializers so that all the WG14 features can be uniquely identified despite the lack of a feature testing macro.
-
Johannes de Fine Licht authored
This operation is not marked pure because it needs to survive DCE, but is otherwise safe to inline. Reviewed By: Dinistro Differential Revision: https://reviews.llvm.org/D151070
-
Johannes de Fine Licht authored
We can not yet generate new aliasing metadata based on these arguments because their global nature does not allow parallel inlining, but since this is not necessary for correctness, we allow inlining functions that have arguments with the noalias attribute for now. Reviewed By: gysit Differential Revision: https://reviews.llvm.org/D151067
-
Muhammad Omair Javaid authored
This fixed missing import of lldbsuite.test.decorators in TestInterruptBacktrace.py.
-
pvanhout authored
We naively broke all incoming values, assuming they'd be unique. However it's not illegal to have multiple occurences of, e.g. `[BB0, V0]` in a PHI node. What's illegal though is having the same basic block multiple times but with different values, and it's exactly what the transform caused. This broke in some rare applications where the pattern arised. Now we cache the `BasicBlock, Value` pairs we're breaking so we can reuse the values and preserve this invariant. Solves SWDEV-399460 Reviewed By: #amdgpu, rovka Differential Revision: https://reviews.llvm.org/D151069
-
eopXD authored
For the cover letter of this patch-set, please checkout D146872. Depends on D147916. This is the 11th patch of the patch-set. This patch is a proof-of-concept and will be extended to full coverage in the future. Only vset for tuple type of NF=2, EEW=32, LMUL=1 is defined now. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D147917
-
eopXD authored
For the cover letter of this patch-set, please checkout D146872. Depends on D147915. This is the 10th patch of the patch-set. This patch is a proof-of-concept and will be extended to full coverage in the future. Only vget for tuple type of NF=2, EEW=32, LMUL=1 is defined now. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D147916
-
eopXD authored
For the cover letter of this patch-set, please checkout D146872. Depends on D147914. This is the 9th patch of the patch-set. This patch is a proof-of-concept and will be extended to full coverage in the future. Currently, the old non-tuple indexed segment store is not removed, and only signed integer indexed segment store of NF=2, EEW=32 is defined here. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D147915
-
eopXD authored
For the cover letter of this patch-set, please checkout D146872. Depends on D147913. This is the 8th patch of the patch-set. This patch is a proof-of-concept and will be extended to full coverage in the future. Currently, the old non-tuple indexed segment load is not removed, and only signed integer indexed segment load of NF=2, EEW=32 is defined here. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D147914
-
Johannes Reifferscheid authored
(For MemorySlotTypeInterfaces) Summary: Reviewers: khasanovaa Subscribers:
-
eopXD authored
For the cover letter of this patch-set, please checkout D146872. Depends on D147912. This is the 7th patch of the patch-set. This patch is a proof-of-concept and will be extended to full coverage in the future. Currently, the old non-tuple strided segment store is not removed, and only signed integer strided segment store of NF=2, EEW=32 is defined here. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D147913
-
eopXD authored
For the cover letter of this patch-set, please checkout D146872. Depends on D147911. This is the 6th patch of the patch-set. This patch is a proof-of-concept and will be extended to full coverage in the future. Currently, the old non-tuple strided segment load is not removed, and only signed integer strided segment load of NF=2, EEW=32 is defined here. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D147912
-
eopXD authored
For the cover letter of this patch-set, please checkout D146872. Depends on D147774. This is the 5th patch of the patch-set. This patch is a proof-of-concept and will be extended to full coverage in the future. Currently, the old non-tuple unit-stride fault-first segment load is not removed, and only signed integer unit-stride fault-first segment load of NF=2, EEW=32 is defined here. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D147911
-
Andrew Gozillon authored
Revert "[Flang][OpenMP][MLIR] Add declare target attribute set and interface for the OpenMP dialect" This reverts commit 95b0b867. Revert until fix found for certain failing buildbots
-
Jay Foad authored
This just makes it clearer that we do not want the scavenger to spill here. NFCI. Differential Revision: https://reviews.llvm.org/D150774
-
Muhammad Omair Javaid authored
TestInterruptBacktrace.py started randonmly failing on Arm/Linux buildbot since e19387e6. This patch marks it skipped. Differential Revision: https://reviews.llvm.org/D150236
-
Jean Perier authored
Lower hlfir.where when the scheduling analysis determined that no temporary storage is needed. Differential Revision: https://reviews.llvm.org/D150881
-
Christian Kandeler authored
... by skipping the conflict check. The same considerations apply. Reviewed By: hokein Differential Revision: https://reviews.llvm.org/D150685
-
Jean Perier authored
Nothing special is needed, other than adding the logging code for where masks and to plug the pattern. This tests mainly adds test. Note that some of the justifications to create temps shows some lacks of side effect interface on operations (like hlfir.transpose), or on some transparent llvm intrinsic calls (llvm.stacksave/restore). I think we should as much as possible try to improve this on the ops generate code rather than special casing it here. Differential Revision: https://reviews.llvm.org/D150581
-
Kiran Chandramohan authored
Fixes #60874 Reviewed By: psoni2628, NimishMishra Differential Revision: https://reviews.llvm.org/D151027
-
Andrew Gozillon authored
This attribute represents the OpenMP declare target directive, it marks a function or global as declare target by being present but also contains information on the device_type and capture clause (link or to). It being an attribute allows it to mark existing constructs and be converted trivially on lowering from the OpenMP dialect to MLIR using amendOperation. An interface has been made for the declare target attribute, with several helper methods for managing the attribute, this interface can be applied to MLIR operations that are allowed to be marked as declare target (as an example, it is by default applied to func.func, LLVMFunc, fir.GlobalOps and LLVMGlobalOps). Reviewers: kiranchandramohan Differential Revision: https://reviews.llvm.org/D150328
-
eopXD authored
Signed-off by: eop Chen <eop.chen@sifive.com>
-
Thomas Debesse authored
Fixes https://github.com/llvm/llvm-project/issues/62018.
-
Johannes Reifferscheid authored
Reviewed By: khasanovaa Differential Revision: https://reviews.llvm.org/D151072
-
eopXD authored
For the cover letter of this patch-set, please checkout D146872. Depends on D147731. This is the 4th patch of the patch-set. This patch is a proof-of-concept and will be extended to full coverage in the future. Currently, the old non-tuple unit-stride segment store is not removed, and only signed integer unit-strided segment store of NF=2, EEW=32 is defined here. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D147774
-
eopXD authored
For the cover letter of this patch-set, please checkout D146872. Depends on D146873. This is the 3rd patch of the patch-set. This patch originates from D99593. Note: This patch is a proof-of-concept and will be extended to full coverage in the future. Currently, the old non-tuple unit-stride segment load is not removed, and only signed integer unit-strided segment load of NF=2, EEW=32 is defined here. When replacing the old intrinsics, the extra `IsTuple` parameter under various places will be redundant and removed. Authored-by:
eop Chen <eop.chen@sifive.com> Co-Authored-by:
Hsiangkai Wang <kai.wang@sifive.com> Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D147731
-
Matt Arsenault authored
The only value that can produce -0 is exactly -0, no rounding is involved. If the denormal mode has flushed denormal inputs, a negative value could produce -0. The constrained intrinsics do not track the denormal mode, and this is just generally broken in the current set of FP predicates. The move to computeKnownFPClass will address some of these issues.
-
Florian Hahn authored
Fixes build with debug printing disabled.
-
Matt Arsenault authored
This was only half complete. We need to enable the positive fields for any negative classes.
-
Matt Arsenault authored
-
Krasimir Georgiev authored
-
Luke Lau authored
-
Théo Degioanni authored
This revision introduces a generic implementation of Scalar Replacement Of Aggregates. In contrast to the implementation in LLVM, this focuses on the core of SROA: destructuring aggregates. By implementing interfaces on allocators and accessors, memory allocators can be destructured into smaller allocators, through the MemorySlot abstraction. This pass only works on aggregates that are accessed in a "type-safe" way, that is within the bounds and respecting the type of a given memory slot. The destructuring pattern and functions only peel off the first layer of aggregates and can safely be applied repeatedly. For convenience, the transformation is also available as a pass that will apply the pattern repeatedly. Depends on D149958 Reviewed By: gysit Differential Revision: https://reviews.llvm.org/D150186
-