- Jan 11, 2023
-
-
Alex Brachet authored
Differential Revision: https://reviews.llvm.org/D140492
-
Tobias Gysi authored
Use the module location instead of unknown location if the imported LLVM IR module does not have more precise debug information. Additionally, use the diagMD function to print the metadata instead of just the metadata kind if the import fails. Reviewed By: definelicht Differential Revision: https://reviews.llvm.org/D141357
-
Valentin Clement authored
In some fir.embox cases as shown in the test, the type descriptor was not correctly found and the descriptor was populated with a null in the addendum. This patch fixes this issue. Reviewed By: PeteSteinfeld Differential Revision: https://reviews.llvm.org/D141383
-
Chris Cotter authored
This patch allows clang-tidy to replace traditional for-loops where the container type inherits its `begin`/`end` methods from a base class. Test plan: Added unit test cases that confirm the tool replaces the new pattern. Reviewed By: carlosgalvezp Differential Revision: https://reviews.llvm.org/D140307
-
- Jan 10, 2023
-
-
Nikita Popov authored
Some tests are removed because they check conditions that are not relevant with opaque pointers.
-
Yitzhak Mandelbaum authored
There were two (small) bugs causing crashes in the analysis. This patch fixes both of them. 1. An enum value was accessed as a class member. Now, the engine gracefully ignores such member expressions. 2. Field access in `MemberExpr` of struct/class-typed global variables. Analysis didn't interpret fields of global vars, because the vars were initialized before the fields were added to the "allowlist". Now, the allowlist is set _before_ init of globals. Differential Revision: https://reviews.llvm.org/D141384
-
Aaron Ballman authored
Also regenerates the AST matcher documentation. This matcher is tested in TEST(HasImplicitDestinationType, MatchesSimpleCase) and TEST(HasImplicitDestinationType, DoesNotMatchIncorrectly) in ASTMatchersTraversalTest.cpp.
-
Alex Brachet authored
This will be used to implement the case insensitive str{,n}casecmp This was initially reverted because it broke tests on arm platforms. Unfortunately, it didn't break on my arm machine, but I suspect the problem was the old comparator returned char and not int. Differential Revision: https://reviews.llvm.org/D141235 -
Aaron Ballman authored
The problem was whitespace between the comment and the code for the matcher. Rather than fix the script, I went the easier route and removed the offending newline. If this problem comes up again though, we should consider making the script less fragile.
-
Sanjay Patel authored
This bit-hack transform would cause the new test to infinite loop after 21d3871b. The deleted transform has existed for a very long time, but the profitable parts appear to be handled by other folds now. This fold could replace 2 instructions with 4 instructions, so it was always in danger of going overboard. No tests regress by removing the whole thing.
-
Nico Weber authored
-
Aaron Ballman authored
Note, when regenerating the documentation for this change, no changes were made to the HTML file. There is an existing bug with the AST matcher python script that fails to handle hasBody() specifically. So this commit is to correct the internal documentation but another change will be needed to fix the public documentation.
-
Aaron Ballman authored
Also regenerates the documentation and fixed a validation diagnostic about use of 'is' vs '=='.
-
Matthias Springer authored
When `strict = true`, only pre-existing and newly-created ops are rewritten and/or folded. Such ops are stored in `strictModeFilteredOps`. Newly-created ops were previously added to `strictModeFilteredOps` after calling `addToWorklist` (via `GreedyPatternRewriteDriver::notifyOperationInserted`). Therefore, newly-created ops were never added to the worklist. Also fix a test case that should have gone into an infinite loop (`test.replace_with_new_op` was replaced with itself, which should have caused the op to be rewritten over and over), but did not due to this bug. Differential Revision: https://reviews.llvm.org/D141141
-
Yitzhak Mandelbaum authored
Tweaks elements of the new API for filtering the set of modeled fields. Differential Revision: https://reviews.llvm.org/D141319
-
Shoaib Meenai authored
Android only provides this function on API 28+; fix libc++ builds when targeting older API levels. Reviewed By: arichardson, #libc, philnik Differential Revision: https://reviews.llvm.org/D141184
-
Dinar Temirbulatov authored
-
Yitzhak Mandelbaum authored
Merges `TransferOptions` into the newly-introduced `DataflowAnalysisContext::Options` and removes explicit parameter for `TransferOptions`, relying instead on the common options carried by the analysis context. Given that there was no intent to allow different options between calls to `transfer`, a common value for the options is preferable. Differential Revision: https://reviews.llvm.org/D140703
-
Jay Foad authored
-
Jens Massberg authored
Just specify the encoded bytes instead, which causes less confusion anyway. Differential Revision: https://reviews.llvm.org/D141368
-
Jay Foad authored
-
Tomas Matheson authored
There are a lot of variants of atomic operations, and AArch64 has several distinct options to codegen them, and does different things depending on available features, architecture version and optimisation level. The current testing for atomic operations has been added gradually over time and does not give full coverate. Given how complex the codegen for atomic operations is, it is valuable to cover the entire parameter space, i.e. test them all. The resulting set of tests serve also as a reference for how each is codegened. In order to keep the test files readable and avoid constant updating for unrelated codegen changes, the test outputs are filtered to only include the relevant instructions. This shows for each operation and feature which codegen approach is taken (e.g. ll/sc loop, atomic instruction, library call). The following parameter space is tested: - feature: +lse, +rcpc, etc - optimisation level: O0, O1 (covers GISel and SelectionDAG) - atomic instruction: load, store, cmpxchg, atomirmw* - size: i8, i16, i32, i64, i128 - aligned/unaligned accesses - endianness: big, little - atomic ordering: release, acquire, etc - load atomic only: const/non-const - cmpxchg only: weak/strong - atomicrmw: update operation (add, sub, etc) Notably not covered: - volatility: there should be no difference between volatile/non-volatile - atomicrmw fadd/fsub The files are split by triple, LLVM instruction, and feature. This makes it easy to diff between features and endianness for a given instruction. The file that generates the tests is included. There are 70 test files with an average of 2800 lines each. Differential Revision: https://reviews.llvm.org/D141064
-
Alex Zinenko authored
Add a verifier to the TransformOpInterface ensuring that operations implementing the interface define memory effects on their operands and results. Add the missing effects to TileToForeachThreadOp, specifically for operands that were added at a later version of the op without modifying `getEffects` accordingly. Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D141371
-
Ganesh Gopalasubramanian authored
This reverts commit 313b747c. It wasn't reviwed as yet.
-
Ganesh Gopalasubramanian authored
-
Tobias Gysi authored
Extract a static method to call the MLIR builders that translate LLVM IR instructions to MLIR LLVM dialect operations. This change ensures the MLIR builders have to use the moduleImport argument rather than calling the import methods directly. As a result, both the intrinsic and the instruction MLIR builders have to use a moduleImport argument and none of them has direct access to private moduleImport methods. The revision thus enforces consistent MLIR builder implementations for instructions and intrinsics. The revision also moves parseDataLayoutAlignment closer to its use. Reviewed By: Dinistro Differential Revision: https://reviews.llvm.org/D141265
-
Sam McCall authored
Just specify the encoded bytes instead, which causes less confusion anyway. Differential Revision: https://reviews.llvm.org/D141312
-
Sam McCall authored
Differential Revision: https://reviews.llvm.org/D141362
-
Jay Foad authored
-
Jay Foad authored
-
Alexey Bataev authored
-
Pavel Kopyl authored
As a result, we have identical alignment calculation of byval parameters for: - LowerCall() - getting alignment of an argument (.param) - emitFunctionParamList() - getting alignment of a parameter (.param) in a function declaration - getPrototype() - getting alignment of a parameter (.param) in a function prototypes that is used for indirect calls This change is required to avoid ptxas error: 'Alignment of argument does not match formal parameter'. This error happens even in cases where it logically shouldn't. For instance: .param .align 4 .b8 param0[4]; ... callprototype ()_ (.param .align 2 .b8 _[4]); ... Here we allocate 'param0' with alignment of 4 and it should be fine to pass it to a function that requires minimum alignment of 2. At least ptxas v12.0 rejects this code. Differential Revision: https://reviews.llvm.org/D140581 -
Pavel Kopyl authored
Support of variadic functions triggers an assertion on several tests from llvm/test/CodeGen/Generic/ if nvptx64-* is specified as a default triplet: Support for variadic functions (unsized array parameter) introduced in PTX ISA version 6.0 and requires target sm_30. That happens because those tests contain variadic function calls and default versions of both PTX ISA (3.2) and architecture (sm_20) are below the minimally required. There were no observable problems with these tests before adding support of variadic functions, because nvptx backend just didn't handle them properly generating invalid PTX code. Differential Revision: https://reviews.llvm.org/D141054
-
Nikita Popov authored
Keeping bitcasts in the common_bitcast() test, otherwise sinking no longer occurs there. GVNSink seems to have a silly cost model where sinking just the stores is considered non-profitable, but sinking the stores and bitcasts (which are free...) is profitable. As this is not a default-enabled pass, and this problem would exist without opaque pointers as well, I'm not trying to do anything about this.
-
Ties Stuij authored
When feature CSSC is available, the abs intrinsic should map to the new scalar ABS instruction when using GlobalIsel spec: https://developer.arm.com/documentation/ddi0602/2022-09/Base-Instructions/ABS--Absolute-value- Reviewed By: aemerson Differential Revision: https://reviews.llvm.org/D139419
-
Nikita Popov authored
Avoid use of no-op GEPs.
-
Jens Massberg authored
As far as I can see they are unnecessary and in C++20 they lead to errors. Removing them the tests pass with C++20 and the default version. Example error message: ``` llvm-project/llvm/unittests/IR/PassBuilderCallbacksTest.cpp:275:30: error: expected unqualified-id before ‘)’ token 275 | MockAnalysisHandle<Module>() { setDefaults(); } ``` Differential Revision: https://reviews.llvm.org/D141358 -
Nikita Popov authored
-
Sjoerd Meijer authored
-