- Sep 21, 2021
-
-
River Riddle authored
This revision refactors ElementsAttr into an Attribute Interface. This enables a common interface with which to interact with element attributes, without needing to modify the builtin dialect. It also removes a majority (if not all?) of the need for the current OpaqueElementsAttr, which was originally intended as a way to opaquely represent data that was not representable by the other builtin constructs. The new ElementsAttr interface not only allows for users to natively represent their data in the way that best suits them, it also allows for efficient opaque access and iteration of the underlying data. Attributes using the ElementsAttr interface can directly expose support for interacting with the held elements using any C++ data type they claim to support. For example, DenseIntOrFpElementsAttr supports iteration using various native C++ integer/float data types, as well as APInt/APFloat, and more. ElementsAttr instances that refer to DenseIntOrFpElementsAttr can use all of these data types for iteration: ```c++ DenseIntOrFpElementsAttr intElementsAttr = ...; ElementsAttr attr = intElementsAttr; for (uint64_t value : attr.getValues<uint64_t>()) ...; for (APInt value : attr.getValues<APInt>()) ...; for (IntegerAttr value : attr.getValues<IntegerAttr>()) ...; ``` ElementsAttr also supports failable range/iterator access, allowing for selective code paths depending on data type support: ```c++ ElementsAttr attr = ...; if (auto range = attr.tryGetValues<uint64_t>()) { for (uint64_t value : *range) ...; } ``` Differential Revision: https://reviews.llvm.org/D109190
-
River Riddle authored
Currently DenseElementsAttr only exposes the ability to get the full range of values for a given type T, but there are many situations where we just want the beginning/end iterator. This revision adds proper value_begin/value_end methods for all of the supported T types, and also cleans up a bit of the interface. Differential Revision: https://reviews.llvm.org/D104173
-
River Riddle authored
SparseElementsAttr currently does not perform any verfication on construction, with the only verification existing within the parser. This revision moves the parser verification to SparseElementsAttr, and also adds additional verification for when a sparse index is not valid. Differential Revision: https://reviews.llvm.org/D109189
-
Stella Laurenzo authored
* ODS generated operations extend _OperationBase and without this, cannot be marshalled to CAPI functions. * No test case updates: this kind of interop is quite hard to verify with in-tree tests. Differential Revision: https://reviews.llvm.org/D110030
-
Usman Nadeem authored
Differential Revision: https://reviews.llvm.org/D109808 Change-Id: I1a10d2bc33acbe0ea353c6cb3d077851391fe73e
-
Nico Weber authored
-
Nico Weber authored
-
Chia-hung Duan authored
Some patterns may share the common DAG structures. Generate a static function to do the match logic to reduce the binary size. Reviewed By: jpienaar Differential Revision: https://reviews.llvm.org/D105797
-
Mehdi Amini authored
Folks may not read the source of the tool and miss these instructions. Differential Revision: https://reviews.llvm.org/D110082
-
Amara Emerson authored
For x86 Darwin, we have a stack checking feature which re-uses some of this machinery around stack probing on Windows. Renaming this to be more appropriate for a generic feature. Differential Revision: https://reviews.llvm.org/D109993
-
natashaknk authored
Reviewed By: rsuderman Differential Revision: https://reviews.llvm.org/D110096
-
Nico Weber authored
-
natashaknk authored
[mlir][tosa] Remove the documentation requirement for elements of several binary elementwise ops to be of the same rank. Reviewed By: rsuderman Differential Revision: https://reviews.llvm.org/D110095
-
- Sep 20, 2021
-
-
Jacob Lambert authored
[AMDGPU][NFC] Correct typos in lib/Target/AMDGPU/AMDGPU*.cpp files. Test commit for new contributor.
-
Amara Emerson authored
This attribute calls a function instead of emitting a trap instruction. Differential Revision: https://reviews.llvm.org/D110098
-
Saleem Abdulrasool authored
When building in C mode, the VC runtime assumes that it can use pointer aliasing through `char *` for the parameter to `__va_start`. Relax the checks further. In theory we could keep the tests strict for non-system header code, but this takes the less strict approach as the additional check doesn't particularly end up being too much more helpful for correctness. The C++ type system is a bit stricter and requires the explicit cast which we continue to verify.
-
Shilei Tian authored
Reviewed By: jhuber6, grokos Differential Revision: https://reviews.llvm.org/D110104
-
Nikita Popov authored
This partially addresses the verifier failures caused by D110026. In particular, it does not fix the "second level" alias metadata.
-
Florian Mayer authored
Reviewed By: eugenis Differential Revision: https://reviews.llvm.org/D110067
-
Craig Topper authored
These are cases were the splat is in another basic block. CGP needs to sink it to expose the opportunity to SelectionDAG.
-
Paul Robinson authored
-
Nico Weber authored
This reverts commit 6d7b3d6b. Breaks running cmake with `-DCLANG_ENABLE_STATIC_ANALYZER=OFF` without turning off CLANG_TIDY_ENABLE_STATIC_ANALYZER. See comments on https://reviews.llvm.org/D109611 for details.
-
Nico Weber authored
See discussion on https://reviews.llvm.org/D110016 for details.
-
Craig Topper authored
If either of the multiplicands is a splat, we can sink it to use vfmacc.vf or similar.
-
Craig Topper authored
This is another case of a splat being in another basic block preventing SelectionDAG from optimizing it.
-
Arthur O'Dwyer authored
- Simplify the structure of the new tests. - Test const containers as well as non-const containers, since it's easy to do so. - Remove redundant enable-iffing of helper structs' member functions. (They're not instantiated unless they're called, and who would call them?) - Fix indentation and use more consistent SFINAE method in <unordered_map>. - Add _LIBCPP_INLINE_VISIBILITY on some swap functions. Differential Revision: https://reviews.llvm.org/D109011
-
Arthur O'Dwyer authored
Now that __builtin_is_constant_evaluated() is present on all supported compilers, we can use it to skip the UB-inducing assert in cases where the computation might be happening at constexpr time. Differential Revision: https://reviews.llvm.org/D101674
-
Alex Langford authored
-
Arthur Eubanks authored
-Wl,-z,defs doesn't work with sanitizers. See https://clang.llvm.org/docs/AddressSanitizer.html Reviewed By: thakis Differential Revision: https://reviews.llvm.org/D110086
-
Nikita Popov authored
We implement logic to convert a byte offset into a sequence of GEP indices for that offset in a number of places. This patch adds a DataLayout::getGEPIndicesForOffset() method, which implements the core logic. I've updated SROA, ConstantFolding and InstCombine to use it, and there's a few more places where it looks relevant. Differential Revision: https://reviews.llvm.org/D110043
-
MaheshRavishankar authored
For `memref.subview` operations, when there are more than one unit-dimensions, the strides need to be used to figure out which of the unit-dims are actually dropped. Differential Revision: https://reviews.llvm.org/D109418
-
Peyton, Jonathan L authored
The indirect lock table can exhibit a race condition during initializing and setting/unsetting locks. This occurs if the lock table is resized by one thread (during an omp_init_lock) and accessed (during an omp_set|unset_lock) by another thread. The test runtime/test/lock/omp_init_lock.c test exposed this issue and will fail if run enough times. This patch restructures the lock table so pointer/iterator validity is always kept. Instead of reallocating a single table to a larger size, the lock table begins preallocated to accommodate 8K locks. Each row of the table is allocated as needed with each row allowing 1K locks. If the 8K limit is reached for the initial table, then another table, capable of holding double the number of locks, is allocated and linked as the next table. The indices stored in the user's locks take this linked structure into account when finding the lock within the table. Differential Revision: https://reviews.llvm.org/D109725
-
Geoffrey Martin-Noble authored
When https://reviews.llvm.org/D109520 was landed, it reverted the addition of this switch case added in https://reviews.llvm.org/D109293. This caused `-Wswitch` failures (and presumably broke the functionality added in the latter patch).
-
Yuanfang Chen authored
While at it, add the diagnosis message "left operand of comma operator has no effect" (used by GCC) for comma operator. This also makes Clang diagnose in the constant evaluation context which aligns with GCC/MSVC behavior. (https://godbolt.org/z/7zxb8Tx96) Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D103938
-
MaheshRavishankar authored
Add an interface that allows grouping together all covolution and pooling ops within Linalg named ops. The interface currently - the indexing map used for input/image access is valid - the filter and output are accessed using projected permutations - that all loops are charecterizable as one iterating over - batch dimension, - output image dimensions, - filter convolved dimensions, - output channel dimensions, - input channel dimensions, - depth multiplier (for depthwise convolutions) Differential Revision: https://reviews.llvm.org/D109793
-
Fangrui Song authored
This reverts commit 4b80f012. debuginfo-tests has been renamed to cross-project-tests.
-
Fangrui Song authored
This partially reverts commits 1fc2a47f and 9816e726. See D109727. Replacing config.guess in favor of {gcc,clang} -dumpmachine can avoid the riscv64-{redhat,suse}-linux GCC detection. Acked-by:
Luís Marques <luismarques@lowrisc.org>
-
Arthur O'Dwyer authored
All supported compilers have supported `=delete` as an extension in C++03 mode for many years at this point. Differential Revision: https://reviews.llvm.org/D109942
-
Craig Topper authored
-
Craig Topper authored
[RISCV] Add test cases showing failure to use .vf vector operations when splat is in another basic block. NFC We should have CGP copy the splats into the same basic block as the FP operation so that SelectionDAG can fold them.
-