- Sep 14, 2023
-
-
Oleg Shyshkov authored
-
Felix Schneider authored
memref.copy gets lowered to a function call sometimes, this function is passed the element size of the memref in bytes as an argument. The element size passed to the copyMemRef() function call can be miscalculated if the LLVM IR uses aligned access to the memory. This can be fixed by using llvm.getelementptr to calculate the element size natively. This is also done in the other lowering path that lowers to an intrinsic. Fix https://github.com/llvm/llvm-project/issues/64072 Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D156126
-
Benjamin Kramer authored
-
Felix Schneider authored
MemRef descriptors contain - among others - a field called `alignedPtr` or `data` and a field called `offset`. The actual buffer of the MemRef starts at `offset` elements after `alignedPtr`. In the CRunnerUtils, there exist helper classes to iterate over MemRefs' elements but the `offset` is not handled consistently so that accessing a MemRef with an `offset` != 0 via an iterator will lead to incorrect results. The problem is that "offset" can be understood in two ways, firstly as the offset of the beginning of the MemRef with respect to the `alignedPtr`, ie what the `offset` field means in the MemRef descriptor, and secondly as the offset of some element within the MemRef relative to the first element of the MemRef, which could more accurately be called something like `linearIndex`. The `offset` field within `StridedMemRefIterator` and `DynamicMemRefIterator` are interpreted the first way, therefore the offsets passed to the constructors of these classes need to account for the already existing offset in the descriptor on top of any potential "shift" within the MemRef. This patch takes care of that and adds some basic tests that catch problems with indexing MemRefs with an `offset`. Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D157008
-
Felix Schneider authored
The lowering pattern to LLVM for memref.transpose has a bug where instead of transposing from (source) -> (dest) it actually transposes (dest) -> (source). This patch fixes the bug and updates the test. Fix https://github.com/llvm/llvm-project/issues/65145 Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D159290
-
khei4 authored
This reverts commit efe8aa2e. Differential Revision: https://reviews.llvm.org/D155406
-
Balazs Benics authored
Fix build bot: https://lab.llvm.org/buildbot/#/builders/139/builds/49699 clang/test/Analysis/taint-generic.c: ``` Line 100: redefinition of typedef 'size_t' is a C11 feature Line 59: previous definition is here ``` This commit fixups 61924da6 Committed in this PR: https://github.com/llvm/llvm-project/pull/66074
-
David Spickett authored
The testing page already has some page about debugging failures. I'm not linking directly to that section because: * The earlier sections about running single tests and such are just as useful for debugging in general. * The new theme has a nice sidebar on the right that makes it really easy to find what you want once on the page. * We'll probably add more content to the testing page later.
-
Martin Erhart authored
Add a new Buffer Deallocation pass with the intend to replace the old one. For now it is added as a separate pass alongside in order to allow downstream users to migrate over gradually. This new pass has the goal of inserting fewer clone operations and supporting additional use-cases. Please refer to the Buffer Deallocation section in the updated Bufferization.md file for more information on how this new pass works.
-
M Iyengar authored
This patch adds support for two missing ACLE intrinsics for floating point round with ties to even: - rintn - rintnf These are specified in ACLE section 8.6: [https://arm-software.github.io/acle/main/acle.html#floating-point-data-processing-intrinsics]
-
Balazs Benics authored
Functions like `fgets`, `strlen`, `strcat` propagate taint. However, their `wchar_t` variants don't. This patch fixes that. Notice, that there could be many more APIs missing. This patch intends to fix those that so far surfaced, instead of exhaustively fixing this issue. https://github.com/llvm/llvm-project/pull/66074
-
Balazs Benics authored
This allows to track taint on real code from `socket()` to reading into a buffer using `recv()`. https://github.com/llvm/llvm-project/pull/66074
-
Balazs Benics authored
The `stdin` declaration should be within `extern "C" {...}`, in C++ mode. In addition, it should be also marked `extern` in both C and C++ modes. I tightened the check to ensure we only accept `stdin` if both of these match. However, from the Juliet test suite's perspective, this commit should not matter. https://github.com/llvm/llvm-project/pull/66074 -
DonatNagyE authored
Recent changes in StdLibraryFunctionsChecker introduced a situation where the checker sequentially performed two state transitions to add two separate note tags. In the unlikely case when the updated state (the variable `NewState`) was posteriorly overconstrained, the engine marked the node after the first state transition as a sink to stop the "natural" graph exploration after that point. However, in this particular case the checker tried to directly add a second node, and this triggered an assertion in the `addPredecessor()` method of `ExplodedNode`. This commit introduces an explicit `isSink()` check to avoid this crash. To avoid similar bugs in the future, perhaps it would be possible to tweak `addTransition()` and ensure that it returns `nullptr` when it would return a sink node (to unify the two possible error conditions). This crash was observed in an analysis of the curl project (in a very long and complex function), and there I validated that this is the root cause, but I don't have a self-contained testcase that can trigger the creation of a PosteriorlyOverconstrained node in this situation.
-
Carlo Bramini authored
Attached patch fixes issues #63582 and #57718 when building my port to CYGWIN of llvm-project. https://github.com/llvm/llvm-project/issues/63582 https://github.com/llvm/llvm-project/issues/57718 Reviewed By: mstorsjo Differential Revision: https://reviews.llvm.org/D159404
-
Sergio Afonso authored
Default atomic ordering information is processed in the OpenMP dialect to LLVM IR lowering stage at every spot where an operation can be affected by it. The rest of clauses are stored globally in the OpenMPIRBuilderConfig object before starting that lowering stage, so that the OMPIRBuilder can conditionally modify code generation depending on these. At the end of the process, the omp.requires attribute is itself lowered into a global constructor that passes these clauses as flags to the OpenMP runtime. Depends on D147217, D147218 and D158278. Differential Revision: https://reviews.llvm.org/D147219
-
Sergio Afonso authored
This patch implements the lowering of the OpenMP 'requires' directive from Flang parse tree to MLIR attributes attached to the top-level module. Target-related 'requires' clauses are gathered and combined for each top-level unit during semantics. Lastly, a single module-level `omp.requires` attribute is attached to the MLIR module with that information at the end of the process. The `atomic_default_mem_order` clause is not addressed by this patch, but rather it will come as a separate patch and follow a different approach. Depends on D147214, D150328, D150329 and D157983. Differential Revision: https://reviews.llvm.org/D147218
-
Sergio Afonso authored
This patch updates the `OpenMPIRBuilderConfig` structure to hold all available 'requires' clauses, and it replicates part of the code generation for the 'requires' registration function from clang in the `OMPIRBuilder`, to be used with flang. Porting the rest of features of the clang implementation to the IRBuilder and sharing it between clang and flang remains for a future patch, due to the complexity of the logic selecting the attributes of the generated registration function. Differential Revision: https://reviews.llvm.org/D147217
-
martinboehme authored
Before, we were silently letting the test pass, which masks test bugs; for an example, see https://github.com/llvm/llvm-project/pull/66195.
-
Bill Wendling authored
Minimize the headers included in header files to reduce the number of files that need recompiled after a change.
-
David Spickett authored
2 of them were missing the ":" on the end. Adding them broke the test so I had to add a new prefix just for the warning runs only. I manually checked the first RUNs and there is no warning emitted, as expected.
-
Benjamin Kramer authored
This keeps it working after the gtest update in a866ce78
-
David Green authored
We apparently somehow had lowering for the STRICT nodes without any handling for the normal operations. This makes sure we support the LRINT and LROUND intrinsics for fp16 when +fullfp16 is not present.
-
vic authored
Remove assertion violated by loop-like operations. Signed-off-by:Victor Perez <victor.perez@codeplay.com>
-
Guillaume Chatelet authored
-
Hans authored
[clang] Don't inherit dllimport/dllexport to exclude_from_explicit_instantiation members during explicit instantiation (#65961) This is a continuation of https://reviews.llvm.org/D155713 Fixes https://github.com/llvm/llvm-project/issues/40363
-
David Spickett authored
Using: black --exclude "third_party/" ./lldb/
-
Matthias Springer authored
This commit generalizes empty tensor elimination to operate on subset ops. No new test cases are added because all current subset ops were already supported previously. From this perspective, this change is NFC. A new interface method (and a helper method) are added to `SubsetInsertionOpInterface` to build the subset of the destination tensor.
-
Weining Lu authored
is_fpclass (fj, mask) -> sltu (r0, and (movfr2gr.[sd] (fclass.[sd] fj), (to_fclass_mask mask))) [1]: https://loongson.github.io/LoongArch-Documentation/LoongArch-Vol1-EN.html#_fclass_sd Reviewed By: wangleiat Differential Revision: https://reviews.llvm.org/D159183
-
Jianjian Guan authored
-
Cullen Rhodes authored
This patch adds support for lowering vector.outerproduct to the ArmSME MOPA intrinsic for the following types: vector<[8]xf16>, vector<[8]xf16> -> vector<[8]x[8]xf16> vector<[8]xbf16>, vector<[8]xbf16> -> vector<[8]x[8]xbf16> vector<[4]xf32>, vector<[4]xf32> -> vector<[4]x[4]xf32> vector<[2]xf64>, vector<[2]xf64> -> vector<[2]x[2]xf64> The FP variants are lowered to FMOPA (non-widening) [1] and BFloat to BFMOPA (non-widening) [2]. Note at the ISA level these variants are implemented by different architecture features, these are listed below: FMOPA (non-widening) * half-precision - +sme2p1,+sme-f16f16 * single-precision - +sme * double-precision - +sme-f64f64 BFMOPA (non-widening) * half-precision - +sme2p1,+b16b16 There's currently no way to target different features when lowering to ArmSME. Integration tests are added for F32 and F64. We use QEMU to run the integration tests but SME2 support isn't available yet, it's targeted for 9.0, so integration tests for these variants excluded. Masking is currently unsupported. Depends on #65450. [1] https://developer.arm.com/documentation/ddi0602/2023-06/SME-Instructions/FMOPA--non-widening---Floating-point-outer-product-and-accumulate- [2] https://developer.arm.com/documentation/ddi0602/2023-06/SME-Instructions/BFMOPA--non-widening---BFloat16-floating-point-outer-product-and-accumulate- -
Timm Bäder authored
Since we have visitAPValue now, we might as well use it here. Differential Revision: https://reviews.llvm.org/D158502
-
Antonio Frighetto authored
-
Nikita Popov authored
When pushing a sub nsw 0, %x negation into an expression, try to preserve the nsw flag for the cases where this is possible. Do this by passing the flag through recursive Negator::negate() calls. Proofs: https://alive2.llvm.org/ce/z/oRPNcY Differential Revision: https://reviews.llvm.org/D158510
-
Owen Pan authored
Fixes #65877.
-
Antonio Frighetto authored
An assertion issue that arose when handling union member access with virtual base class has been addressed. As pointed out by @zygoloid, there is no need for further derived-to-base analysis in this instance, so we can bail out upon encountering a virtual base class. Minor refinement on the function name as we might not be handling a union. Reported-By: ormris Fixes: https://github.com/llvm/llvm-project/issues/65982
-
Pierre van Houtryve authored
Fixes SWDEV-403219
-
Tom Stellard authored
The builtin concurrency functionality for the workflows will cancel a pending job if there is another job from the same workflow running. For the pr-subscriber job, this means that if multiple labels are added at the same time, then some of the pr-subscriber jobs will be cancelled and the PR will not have all the necessary mentions.
-
Siva Chandra authored
This fixes the broken overlay builders.
-