- Oct 14, 2021
-
-
Aart Bik authored
This is the first step towards supporting general sparse tensors as output of operations. The init sparse tensor is used to materialize an empty sparse tensor of given shape and sparsity into a subsequent computation (similar to the dense tensor init operation counterpart). Example: %c = sparse_tensor.init %d1, %d2 : tensor<?x?xf32, #SparseMatrix> %0 = linalg.matmul ins(%a, %b: tensor<?x?xf32>, tensor<?x?xf32>) outs(%c: tensor<?x?xf32, #SparseMatrix>) -> tensor<?x?xf32, #SparseMatrix> Reviewed By: bixia Differential Revision: https://reviews.llvm.org/D111684 -
Stella Stamenova authored
These tests fail every 10 or so runs on Windows causing both local failures as well as buildbot failures. Differential Revision: https://reviews.llvm.org/D111659
-
Mike Rice authored
Adds initial parsing and sema for the 'adjust_args' clause. Note that an AST clause is not created as it instead adds its expressions to the OMPDeclareVariantAttr. Differential Revision: https://reviews.llvm.org/D99905
-
liuke authored
bugprone-argument-comment: SourceLocation valid judgment avoid emitting coredump in isInSystemHeader If the Node has an invalid location, it will trigger assert in isInSystemHeader(...). void test() { __builtin_va_list __args; // __builtin_va_list has no defination in any source file and its // CXXConstructorDecl has invalid sourcelocation } coredump with "Assertion `Loc.isValid() && "Can't get file characteristic of invalid loc!"' failed." in getFileCharacteristic(SourceLocation). -
Philip Reames authored
This is a follow on for D111675 which implements the gep case. I'd originally left it out because I was hoping to actually implement the inrange todo, but after a bit of staring at the code, decided to leave it as is since it doesn't effect this use case (i.e. instcombine requires the op to freeze to be an instruction). Differential Revision: https://reviews.llvm.org/D111691
-
Florian Hahn authored
Precommit a test for D111643.
-
Jay Foad authored
This has a couple of benefits: 1. It can sometimes fix clusters that got broken apart when the register allocator inserted a copy. 2. Post-RA scheduling does not have to worry about increasing register pressure, which in some cases gives it more freedom to reorder instructions. Testing on a collection of 10,000 graphics shaders compiled for gfx1010 showed: - The average length of each run of one or more load instructions increased by about 1%. - The number of runs of two or more load instructions increased by about 4%. Differential Revision: https://reviews.llvm.org/D111646
-
Jan Svoboda authored
During explicit modular build, PCM files are typically specified via the `-fmodule-file=<path>` command-line option. Early during the compilation, Clang uses the `ASTReader` to read their contents and caches the result so that the module isn't loaded implicitly later on. A listener is attached to the `ASTReader` to collect names of the modules read from the PCM files. However, if the PCM has already been loaded previously via PCH: 1. the `ASTReader` doesn't do anything for the second time, 2. the listener is not invoked at all, 3. the module load result is not cached, 4. the compilation fails when attempting to load the module implicitly later on. This patch solves this problem by attaching the listener to the `ASTReader` for PCH reading as well. Reviewed By: dexonsmith Differential Revision: https://reviews.llvm.org/D111560
-
Jan Svoboda authored
This is a prep patch for D111560.
-
xndcn authored
Differential Revision: https://reviews.llvm.org/D111510
-
- Oct 13, 2021
-
-
Valentin Clement authored
AffinePromotion and AffineDemotion passes where upstreamed in their current status from fir-dev. In order to make sure everybody is on the same page, this patch add some comments to state that. Reviewed By: schweitz Differential Revision: https://reviews.llvm.org/D111629
-
Alex Zinenko authored
-
Raphael Isemann authored
-
Alex Zinenko authored
The type can be inferred trivially, but it is currently done as string stitching between ODS and C++ and is not easily exposed to Python. Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D111712
-
thomasraoux authored
Make canonicalization working on broadcast also work on splat op. Differential Revision: https://reviews.llvm.org/D111690
-
Jeremy Morse authored
In D110173 we start using the existing LLVM IDF calculator to place PHIs as we reconstruct an SSA form of machine-code program. Sadly that's slower than the old (but broken) way, this patch attempts to recover some of that performance. The key observation: every time we def a register, we also have to def it's register units. If we def'd $rax, in the current implementation we independently calculate PHI locations for {al, ah, ax, eax, hax, rax}, and they will all have the same PHI positions. Instead of doing that, we can calculate the PHI positions for {al, ah} and place PHIs for any aliasing registers in the same positions. Any def of a super-register has to def the unit, and vice versa, so this is sound. It cuts down the SSA placement we need to do significantly. This doesn't work for stack slots, or registers we only ever read, so place PHIs normally for those. LiveDebugValues choses to ignore writes to SP at calls, and now have to ignore writes to SP register units too. Differential Revision: https://reviews.llvm.org/D111627 -
LLVM GN Syncbot authored
-
Michael Kruse authored
Instead of setting operands to undef as the "operands" pass does, convert the operands to a function argument. This avoids having to introduce undef values into the IR which have some unpredictability during optimizations. For instance, define void @func() { entry: %val = add i32 32, 21 store i32 %val, i32* null ret void } is reduced to define void @func(i32 %val) { entry: %val1 = add i32 32, 21 store i32 %val, i32* null ret void } (note that the instruction %val is renamed to %val1 when printing the IR to avoid ambiguity; ideally %val1 would be removed by dce or the instruction reduction pass) Any call to @func is replaced with a call to the function with the new signature and filled with undef. This is not ideal for IPA passes, but those out-of-scope for now. Reviewed By: aeubanks Differential Revision: https://reviews.llvm.org/D111503 -
Sanjay Patel authored
-
Kamau Bridgeman authored
The builtin __rlwnm is currently constrained to accept only constants for the shift parameter but the instructions emitted for it have no such constraint, this patch allows the builtins to accept variable shift. Reviewed By: NeHuang, amyk Differential Revision: https://reviews.llvm.org/D111229
-
Sanjay Patel authored
This is NFC-intended for scalar code. There are still unnecessary m_ConstantInt restrictions in surrounding code, so this is not a complete fix. This prevents regressions seen with a planned follow-on to D111410.
-
Sanjay Patel authored
There's a substantial pile of scalar tests for transforms that depend on this code, but zero vector coverage. This patch adds a vector test next to the first scalar test in each file that is affected by foldLogOpOfMaskedICmps. The code that handles these transforms is artificially limited from working with vector splat constants.
-
Raphael Isemann authored
-
Alex Zinenko authored
-
Alex Zinenko authored
When writing the user-facing documentation, I noticed several inconsistencies and asymmetries in the Python API we provide. Fix them by adding: - the `owner` property to regions, similarly to blocks; - the `isinstance` method to any class derived from `PyConcreteAttr`, `PyConcreteValue` and `PyConreteAffineExpr`, similar to `PyConcreteType` to enable `isa`-like calls without having to handle exceptions; - a mechanism to create the first block in the region as we could only create blocks relative to other blocks, with is impossible in an empty region. Reviewed By: gysit Differential Revision: https://reviews.llvm.org/D111556
-
Jeremy Morse authored
Old versions of gcc want template specialisations to happen within the namespace where the template lives; this is still present in gcc 5.1, which we officially support, so it has to be worked around.
-
Louis Dionne authored
I came across an issue where since we build the library for Apple with the install name directory being /usr/lib, which means that if we don't run the tests with DYLD_LIBRARY_PATH, we'll end up loading the system-provided libc++abi when running the tests. That wreaks havoc. Instead of fixing it in the legacy config file, this commit introduces an Apple libc++abi config file that does the right thing. Differential Revision: https://reviews.llvm.org/D111279
-
Louis Dionne authored
Instead of always defining LIBCXXABI_NO_TIMER to run the tests, only define LIBCXXABI_USE_TIMER when we want to enable the timer. This makes the libc++abi testing configuration simpler. As a fly-by fix, remove the unused LIBUNWIND_NO_TIMER macro from libunwind. Differential Revision: https://reviews.llvm.org/D111667
-
Jeremy Morse authored
InstrRefBasedLDV used to try and determine which values are in which registers using a lattice approach; however this is hard to understand, and broken in various ways. This patch replaces that approach with a standard SSA approach using existing LLVM utilities. PHIs are placed at dominance frontiers; value propagation then eliminates un-necessary PHIs. This patch also adds a bunch of unit tests that should cover many of the weirder forms of control flow. Differential Revision: https://reviews.llvm.org/D110173
-
Hsiangkai Wang authored
Previous patch only reverts C builtins for tail policy. In order to keep LLVM IR intact, add the `ta` argument in vector builtins.
-
Hsiangkai Wang authored
This reverts commit 7afa61e7.
-
Nathan Sidwell authored
Spotted when implementing an extension.
-
Adam Czachorowski authored
Previously we would call getAsTemplate() when kind == TemplateExpansion, which triggers an assertion. The call is now replaced with getAsTemplateOrTemplatePattern(), which is exactly the same as getAsTemplate(), except it allows calls when kind == TemplateExpansion. No change in behavior for no-assert builds. Differential Revision: https://reviews.llvm.org/D111648
-
Raphael Isemann authored
Just moving that block inside DWARFASTParserClang::ParseChildMembers into its own function. Also early-exiting instead of a large if when num_attributes is 0.
-
Nathan Sidwell authored
The p0388 patch series took so long, the clang version was incorrect, and I failed to realize that.
-
Kerry McLaughlin authored
This patch adds patterns to match the following with INC/DEC: - @llvm.aarch64.sve.cnt[b|h|w|d] intrinsics + ADD/SUB - vscale + ADD/SUB For some implementations of SVE, INC/DEC VL is not as cheap as ADD/SUB and so this behaviour is guarded by the "use-scalar-inc-vl" feature flag, which for SVE is off by default. There are no known issues with SVE2, so this feature is enabled by default when targeting SVE2. Reviewed By: david-arm Differential Revision: https://reviews.llvm.org/D111441
-
Dávid Bolvanský authored
-
Dávid Bolvanský authored
-
Simon Pilgrim authored
-
Simon Pilgrim authored
[X86][SSE] Add tests showing missing shuffle(avg(shuffle(),shuffle())) -> avg(shuffle(),shuffle()) fold X86ISD::AVG needs to be added to isCommutativeBinOp to use these folds.
-