- Jul 14, 2023
-
-
Shubham Sandeep Rastogi authored
This reverts commit fb087c17. This is because of test failures: lldb-unit.Target/_/TargetTests/LocateModuleCallbackTest.GetOrCreateModuleWithCachedModule lldb-unit.Target/_/TargetTests/LocateModuleCallbackTest.GetOrCreateModuleWithCachedModuleAndBreakpadSymbol
-
Nicolas Vasilache authored
Differential Revision: https://reviews.llvm.org/D155298
-
Nicolas Vasilache authored
-
Nikita Popov authored
Support replacement of operands not only in the immediate instruction, but also instructions it uses. To the most part, this extension is straightforward, but there are two bits worth highlighting: First, we can now no longer assume that if the Op is a vector, the instruction also returns a vector. If Op is a vector and the instruction returns a scalar, we should consider it as a cross-lane operation. Second, for the x ^ x special case, we can no longer assume that the operand is RepOp, as we might have a replacement higher up the instruction chain. There is one optimization regression, but it is in a fuzzer-generated test case. Fixes https://github.com/llvm/llvm-project/issues/63104.
-
Nicolas Vasilache authored
Revert "[mlir][memref] NFC - Move utility function declaration from IR/MemRef.h to Utils/MemRefUtils.h" This reverts commit 8b161e97. This creates cyclic dependencies that cannot be easily untangled for now.
-
Jay Foad authored
-
Nikita Popov authored
This change was made as part of 91b84811, which was only supposed to add tests.
-
Alexey Bataev authored
match the size of base node (PR63668). Need to adjust the check for assert and take into account case where the original scalars are reused and were extended to match the vector factor of the reused SLP node.
-
Nikita Popov authored
After the semantics change from https://reviews.llvm.org/D154051, gep inbounds x, 0 can no longer produce poison. As such, we can also perform this fold during non-refining operand replacement and avoid unnecessary drops of the inbounds flag. The online alive2 version has not been update to the new semantics yet, but we can use the following proof locally: define ptr @src(ptr %base, i64 %offset) { %cmp = icmp eq i64 %offset, 0 %gep = getelementptr inbounds i8, ptr %base, i64 %offset %sel = select i1 %cmp, ptr %base, ptr %gep ret ptr %sel } define ptr @tgt(ptr %base, i64 %offset) { %gep = getelementptr inbounds i8, ptr %base, i64 %offset ret ptr %gep }
-
Nikita Popov authored
-
Alexey Bataev authored
This reverts commit 6fdfc812 to fix the check in the assert )need to use end, nod begin function).
-
Takuya Shimizu authored
Now that clang supports printing of multiple lines of code snippet in diagnostics, source ranges in diagnostics that are located in different lines from the diagnosed source location get to be printed if the gap happened to be less than the maximum number of lines clang is allowed to print in. Many of the bad-conversion notes in overload resolution failures have their source location in the function declaration and source range in the argument of function call. This can cause an unnecessarily many lines of snippet printing. This patch fixes it by changing the source range from function callsite to the problematic parameter in function declaration. e.g. ``` void func(int aa, int bb); void test() { func(1, "two"); } ``` BEFORE this patch: ``` source:4:15: error: no matching function for call to 'func' 4 | void test() { func(1, "two"); } | ^~~~ source:1:6: note: candidate function not viable: no known conversion from 'const char[4]' to 'int' for 2nd argument 1 | void func(int aa, int bb); | ^ 2 | 3 | 4 | void test() { func(1, "two"); } | ~~~~~ 1 error generated. ``` AFTER this patch: ``` source:4:15: error: no matching function for call to 'func' 4 | void test() { func(1, "two"); } | ^~~~ source:1:6: note: candidate function not viable: no known conversion from 'const char[4]' to 'int' for 2nd argument 1 | void func(int aa, int bb); | ^ ~~~~~~ ``` Reviewed By: cjdb Differential Revision: https://reviews.llvm.org/D153359 -
Benjamin Kramer authored
-
Alexey Bataev authored
match the size of base node (PR63668). Need to adjust the check for assert and take into account case where the original scalars are reused and were extended to match the vector factor of the reused SLP node.
-
Matthias Springer authored
* Rename functions with underscore to camel case. * Return C++ bools of "in_bounds" values instead of an `ArrayAttr`. Differential Revision: https://reviews.llvm.org/D155277
-
Matthias Springer authored
No need to compute the `in_bounds` attribute. The folder will infer it. Differential Revision: https://reviews.llvm.org/D155172
-
Alexandros Lamprineas authored
Before looking up a value in the map of known constants we attempt to dynamically cast it. The code looks cleaner if we move the cast inside findConstantFor(), where the look up happens. Differential Revision: https://reviews.llvm.org/D155177
-
Markus Böck authored
Using MLIR attributes instead of metadata has many advantages: * No indirection: Attributes can simply refer to each other seemlessly without having to use the indirection of `SymbolRefAttr`. This also gives us correctness by construction in a lot of places as well * Multithreading safe: The Attribute infrastructure gives us thread-safety for free. Creating operations and inserting them into a block is not thread-safe. This is a major use case for e.g. the inliner in MLIR which runs in parallel * Easier to create: There is no need for a builder or a metadata region This patch therefore does exactly that. It leverages the new distinct attributes to create distinct access groups in a deterministic and threadsafe manner. Differential Revision: https://reviews.llvm.org/D155285
-
Nikita Popov authored
(zext a) + (sext a) is 0 if a is a bool. The regression is in a fuzzer-generated test. Proof: https://alive2.llvm.org/ce/z/KotnN6
-
Nikita Popov authored
-
Viktoriia Bakalova authored
Differential Revision: https://reviews.llvm.org/D155215
-
Tobias Hieta authored
We want lld-link to automatically find compiler-rt's and libc++ when it's in the same directory as the rest of the toolchain. This is because on Windows linking isn't done via the clang driver - but instead invoked directly. This prepends: <llvm>/lib <llvm>/lib/clang/XX/lib and <llvm>/lib/clang/XX/lib/windows automatically to the library search paths. Related to #63827 Differential Revision: https://reviews.llvm.org/D151188
-
Nikita Popov authored
cttz(-a & a) is the same as cttz(a). -a & a is an idiom to extract the lowest set bit, which naturally does not affect the number of trailing zeroes. Proof: https://alive2.llvm.org/ce/z/Yp26x7
-
Nikita Popov authored
-
Alex Bradbury authored
Some of these test cases will be changed by upcoming combines, even in the non-zicond case.
-
Matthias Springer authored
Supported ops are "memref.alloc" and "memref.alloca". Differential Revision: https://reviews.llvm.org/D155282
-
Matthias Springer authored
This new option allows users to specify a custom memcpy op. Differential Revision: https://reviews.llvm.org/D155280
-
Jay Foad authored
D149348 did this for readnone calls, which are handled by SimpleValue. This patch does the same for all other CSEable calls, which are handled by CallValue. Differential Revision: https://reviews.llvm.org/D153151
-
Jay Foad authored
Differential Revision: https://reviews.llvm.org/D155210
-
Alex Bradbury authored
[RISCV] Introduce RISCVISD::CZERO_{EQZ,NEZ} nodes produce them when zicond is present in lowerSELECT This patch is a step towards altering how we handle the emission of condops. Marking ISD::SELECT as legal is a major change in the codegen path, and gives few options for maintaining the old codegen path when it is believed to be better (e.g. a better branchless sequence is possible using non-zicond instructions, or the branch-based sequence is preferable). This removes the existing SelectionDAG patterns and moves the logic into lowerSELECT. Along some small codegen changes you'll note a few minor regressions in the generated code quality - this are due to the fact that by lowering the SELECT node early we miss out on combines that would kick in later when setcc condcodes that aren't natively supported have been expanded (thus exposing opportunities for optimisation by performing logical negation and swapping truev/falsev). I've opted to split out work that addresses these into follow-on patches (especially as zicond is still 'experimental'). matchSetCC is a straight-forward translation from the version in RISCVISelDAGToDAG. Ideally, in the future it can be converted to a helper shared between both files. Differential Revision: https://reviews.llvm.org/D155083 -
Tobias Hieta authored
This patch is spun out of https://reviews.llvm.org/D151188 and makes it possible for lld-link to find libraries with relative paths. This will be used later to implement the changes to autolinking runtimes explained in #63827 Differential Revision: https://reviews.llvm.org/D155268
-
Nikita Popov authored
The select arm that takes the ctlz result can also instead be a constant with the bit width (as this is what the ctlz evaluates to for a==0). This avoids a regression when strengthening the simplifyWithOpReplaced() fold. Proof: https://alive2.llvm.org/ce/z/DMRL5A
-
Nikita Popov authored
-
Nikita Popov authored
-
Simon Pilgrim authored
-
Nikita Popov authored
-
David Green authored
This is similar to D153632, but for mul nodes instead of add/sub. They get recognised in LowerMUL in order to detect the mul(ext, ext), in a way that will work for i64 nodes as well as i16/i32. This extends it to look for mul(subvector_extract(ext(x), 0), subvector_extract(ext(y), 0)), generating a subvector_extract(mull(x,y)) if it matches. Differential Revision: https://reviews.llvm.org/D154063
-
Nicolas Vasilache authored
-
Nicolas Vasilache authored
This reverts commit afdb83b1. This was landed with a bad description.
-
Kiran Chandramohan authored
Use typed assignment in Atomic Write lowering to better handle type conversions of allowed types. Note: We should make similar changes for other constructs in later patches. Reviewed By: NimishMishra Differential Revision: https://reviews.llvm.org/D154163
-