- Jun 03, 2024
-
-
Yingwei Zheng authored
Reverts https://github.com/llvm/llvm-project/commit/3bcccb6af685c3132a9ee578b9e11b2503c35a5c and https://github.com/llvm/llvm-project/commit/9a282724a29899e84adc91bdeaf639010408a80d because #91469 causes a miscompilation https://github.com/llvm/llvm-project/pull/91469#discussion_r1623925158.
-
Paul T Robinson authored
Removed foo-registered-target constraints from a bunch of tests, because mostly the driver doesn't need to have a target availabile. I ran check-clang-driver using a build with only the XCore target, and these all passed. There are ~50 tests that still have foo-registered-target, and it looks like most of them are either doing codegen when they don't need to, or don't really belong in the Driver tests. But that's a task for another day.
-
Oleksandr T authored
Check whether parsing of the argument failed before attempting to build the expression. Fixes #80474.
-
Simon Pilgrim authored
Noticed while triaging the failures on #93673 - the attributor pass doesn't emit any range metadata in these tests
-
Michael Maitland authored
We add a feature that prevents the GlobalMerge pass from considering data smaller than a minimum size in bytes for merging. The MinSize is set in 3 ways: 1. If global-merge-min-data-size is explicitly set, then it uses that value. 2. If SmallDataLimit is set and non-zero, then SmallDataLimit + 1 is used. 3. Otherwise, 0 is used, which means all sizes are considered for merging. We found that this feature allowed us to see the benefit of the GlobalMerge pass while eliminating some merging that was not beneficial. This feature allowed us to enable the GlobalMerge pass on RISC-V in our downstream by default because it led to improvements on multiple benchmark suites. I plan to post a separate patch to propose enabling this by default on RISC-V. But I do not want that discussion to be part of the discussion of adding this feature, so I am keeping the patches separate.
-
Nikita Popov authored
To make sure these are preserved when icmp constant expressions are removed.
-
Vyacheslav Levytskyy authored
This PR fixes legalize info for G_BITREVERSE.
-
Christian Kandeler authored
Moving the body of member functions out-of-line makes sense for classes defined in implementation files too.
-
Nikita Popov authored
Make sure this test is preserved when icmp constant expressions are removed.
-
Nikita Popov authored
Also mark the test as nounwind. The unwinding information does not appear to be pertinent to the original intent of the test.
-
Vlad Serebrennikov authored
In #94167 I found out that `cwg28xx.cpp` has been running without `-pedantic-errors` and fixed that. This patch fixes that for the rest of the test suite. Only one test was affected with a trivial fix (warning was escalated to an error). I'm intentionally leaving out test for CWG2390, because it requires major surgery. It's addressed in #94206.
-
Nikita Popov authored
Similar to the change previously made for binops, make m_Trunc() only match instructions, not constant expressions. This is more likely to cause a crash than do something useful. Fixes crash reported at: https://github.com/llvm/llvm-project/pull/92885#issuecomment-2145034670
-
Florian Hahn authored
SCEVLoopGuardRewriter only replaces operands with equivalent values, so we should be able to transfer the flags from the original expression. PR: https://github.com/llvm/llvm-project/pull/91472
-
Endre Fülöp authored
After recent improvements (#80029) and testing on open-source projects, the checker is ready to move out of the alpha package.
-
Simon Pilgrim authored
Avoid std::vector copies as setDefaultProperties just iterates across the Records Fixes #89207
-
Takuto Ikuta authored
goma is deprecated and not maintained anymore. https://chromium.googlesource.com/infra/goma/client/
-
Corentin Ferry authored
This commit lowers bitwise arith ops to EmitC and also brings in `adaptValueType` and `adaptIntegralTypeSignedness` that other ArithToEmitC functions can benefit from.
-
Serge Pavlov authored
After commit 1792852f ([symbolizer] Change reaction on invalid input) llvm-symbolizer issues an error on malformed command instead of echoing it to the standard output, as in previous versions. It turns out this behavior broke a use case when echoing was used to check if llvm-symbolizer is working (https://github.com/llvm/llvm-project/commit/1792852f86dc75efa1f44d46b1a0daf386d64afa#commitcomment-142161925 ). With this change an empty line as input is not considered as an error anymore and does not produce any output on stderr. llvm-symbolizer still respond on empty line with line not found, this is consistent with GNU addr2line. --------- Co-authored-by:
James Henderson <46713263+jh7370@users.noreply.github.com>
-
Chuanqi Xu authored
This reverts commit ccb73e88. It looks like there are some bots complaining about the patch. See the post commit comment in https://github.com/llvm/llvm-project/pull/92083 to track it.
-
Luke Lau authored
Currently we only match GEPs with a scalar base pointer, but a common pattern that's emitted from the loop vectorizer is a strided vector base plus some sort of scalar offset: %base = getelementptr i64, ptr %p, <vscale x 1 x i64> %step %gep = getelementptr i64, <vscale x 1 x ptr> %base, i64 %offset This is common for accesses into a struct e.g. f[i].b below: struct F { int a; char b; }; void foo(struct F *f) { for (int i = 0; i < 1024; i += 2) { f[i].a++; f[i].b++; } } This patch handles this case in RISCVGatherScatterLowering by recursing on the base pointer if it's a vector. With this we can convert roughly 80% of the indexed loads and stores emitted to strided loads and stores on SPEC CPU 2017, -O3 -march=rva22u64_v -
Marc Auberer authored
`std::aligned_storage` is deprecated with C++23, see [here](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p1413r3.pdf). This replaces the usages of `std::aligned_storage` within llvm (only one in ADT and one in Support) with an aligned `std::byte` array. I will provide patches for other subcomponents as well.
-
Vlad Serebrennikov authored
This patch adds tests for some CWG issues that were discussed at 2024-05-31 telecon. While all of them are tentatively ready at the moment, I'm expecting them to be moved to DRs without changes. CWG issues that are expected to have follow-ups are not included in this PR. I also realized that `cwg28xx.cpp` has been testing without `-pedantic-errors`. I fixed that. Fortunately, no existing tests had anything hidden by the lack of this flag. The following CWG issues are covered: [CWG2877](https://cplusplus.github.io/CWG/issues/2877.html) "Type-only lookup for _using-enum-declarator_" [CWG2882](https://cplusplus.github.io/CWG/issues/2882.html) "Unclear treatment of conversion to `void`" [CWG2883](https://cplusplus.github.io/CWG/issues/2883.html) "Definition of "odr-usable" ignores lambda scopes" [CWG2885](https://cplusplus.github.io/CWG/issues/2885.html) "Non-eligible trivial default constructors" [CWG2886](https://cplusplus.github.io/CWG/issues/2886.html) "Temporaries and trivial potentially-throwing special member functions"
-
LLVM GN Syncbot authored
-
Nathan Gauër authored
The structurizer required regions to be SESE: single entry, single exit. This new pass transforms multiple-exit regions into single-exit regions. ``` +---+ | A | +---+ / \ +---+ +---+ | B | | C | A, B & C belongs to the same convergence region. +---+ +---+ | | +---+ +---+ | D | | E | C & D belongs to the parent convergence region. +---+ +---+ This means B & C are the exit blocks of the region. \ / And D & E the targets of those exits. \ / | +---+ | F | +---+ ``` This pass would assign one value per exit target: B = 0 C = 1 Then, create one variable per exit block (B, C), and assign it to the correct value: in B, the variable will have the value 0, and in C, the value 1. Then, we'd create a new block H, with a PHI node to gather those 2 variables, and a switch, to route to the correct target. Finally, the branches in B and C are updated to exit to this new block. ``` +---+ | A | +---+ / \ +---+ +---+ | B | | C | +---+ +---+ \ / +---+ | H | +---+ / \ +---+ +---+ | D | | E | +---+ +---+ \ / \ / | +---+ | F | +---+ ``` Note: the variable is set depending on the condition used to branch. If B's terminator was conditional, the variable would be set using a SELECT. All internal edges of a region are left intact, only exiting edges are updated. --------- Signed-off-by:Nathan Gauër <brioche@google.com>
-
Kareem Ergawy authored
Fixes a bug uncovered by [pr43337.f90](https://github.com/llvm/llvm-test-suite/blob/main/Fortran/gfortran/regression/gomp/pr43337.f90) in the test suite. In particular, this emits `argNo` debug info only if the parent op of a block is a `func.func` op. This avoids DI conflicts when a function contains a nested OpenMP region that itself has block arguments with DI attached to them; for example, `omp.parallel` with delayed privatization enabled.
-
AlexGhiti authored
The Zabha extension was ratified in April 2024. Co-authored-by:Alexandre Ghiti <alexghiti@rivosinc.com>
-
Pavel Labath authored
-
David Spickett authored
On Windows the function does not have a symbol associated with it: Function: id = {0x000001c9}, name = "_Dfunction", range = [0x0000000140001000-0x0000000140001004) LineEntry: <...> Whereas it does on Linux: Function: id = {0x00000023}, name = "_Dfunction", range = [0x0000000000000734-0x0000000000000738) LineEntry: <...> Symbol: id = {0x00000058}, range = [0x0000000000000734-0x0000000000000738), name="_Dfunction" This means that frame.symbol is not valid on Windows. However, frame.function is valid and it also has a "mangled" attribute. So I've updated the test to check the symbol if we've got it, and the function always. In both cases we check that mangled is empty (meaning it has not been treated as mangled) and that the display name matches the original symbol name. -
David Spickett authored
-
Tom Eccles authored
The pass constructor can be generated automatically. This pass doesn't need to be adapted to support other top level operations because it is specifically supposed to filter functions. We don't need to filter non-function top level operations because without use inside of functions they shouldn't lead to any codegen.
-
David Stone authored
-
David Spickett authored
While the fix is reviewed.
-
Pavel Labath authored
For some data formatters, even getting the number of children can be an expensive operations (e.g., needing to walk a linked list to determine the number of elements). This is then wasted work when we know we will be printing only small number of them. This patch replaces the calls to GetNumChildren (at least those on the "frame var" path) with the calls to the capped version, passing the value of `max-children-count` setting (plus one)
-
Vyacheslav Levytskyy authored
This PR fixes invalid OpGroupWaitEvents emission to ensure that SPIR-V Backend inserts a bitcast before OpGroupWaitEvents if the last argument is a pointer that doesn't point to OpTypeEvent.
-
David Green authored
Instcombine will convert fdiv by a power-2 to fmul, this converts the PerformVDIVCombine that converts fdiv+fcvt to fixed-point fcvt to fmul+fcvt. The fdiv tests will look worse, but won't appear in practice (and should be improved again by #93882).
-
Sander de Smalen authored
For streaming-compatible functions with only +sme, we can't use a NEON ORR (aliased as 'mov') for copies of Q-registers, so we need to use a spill/fill instead. This also fixes the fill, which should use the post-incrementing addressing mode.
-
Chuanqi Xu authored
Following of https://github.com/llvm/llvm-project/pull/86912 #### Motivation Example The motivation of the patch series is that, for a module interface unit `X`, when the dependent modules of `X` changes, if the changes is not relevant with `X`, we hope the BMI of `X` won't change. For the specific patch, we hope if the changes was about irrelevant declaration changes, we hope the BMI of `X` won't change. **However**, I found the patch itself is not very useful in practice, since the adding or removing declarations, will change the state of identifiers and types in most cases. That said, for the most simple example, ``` // partA.cppm export module m:partA; // partA.v1.cppm export module m:partA; export void a() {} // partB.cppm export module m:partB; export void b() {} // m.cppm export module m; export import :partA; export import :partB; // onlyUseB; export module onlyUseB; import m; export inline void onluUseB() { b(); } ``` the BMI of `onlyUseB` will change after we change the implementation of `partA.cppm` to `partA.v1.cppm`. Since `partA.v1.cppm` introduces new identifiers and types (the function prototype). So in this patch, we have to write the tests as: ``` // partA.cppm export module m:partA; export int getA() { ... } export int getA2(int) { ... } // partA.v1.cppm export module m:partA; export int getA() { ... } export int getA(int) { ... } export int getA2(int) { ... } // partB.cppm export module m:partB; export void b() {} // m.cppm export module m; export import :partA; export import :partB; // onlyUseB; export module onlyUseB; import m; export inline void onluUseB() { b(); } ``` so that the new introduced declaration `int getA(int)` doesn't introduce new identifiers and types, then the BMI of `onlyUseB` can keep unchanged. While it looks not so great, the patch should be the base of the patch to erase the transitive change for identifiers and types since I don't know how can we introduce new types and identifiers without introducing new declarations. Given how tightly the relationship between declarations, types and identifiers, I think we can only reach the ideal state after we made the series for all of the three entties. #### Design details The design of the patch is similar to https://github.com/llvm/llvm-project/pull/86912, which extends the 32-bit DeclID to 64-bit and use the higher bits to store the module file index and the lower bits to store the Local Decl ID. A slight difference is that we only use 48 bits to store the new DeclID since we try to use the higher 16 bits to store the module ID in the prefix of Decl class. Previously, we use 32 bits to store the module ID and 32 bits to store the DeclID. I don't want to allocate additional space so I tried to make the additional space the same as 64 bits. An potential interesting thing here is about the relationship between the module ID and the module file index. I feel we can get the module file index by the module ID. But I didn't prove it or implement it. Since I want to make the patch itself as small as possible. We can make it in the future if we want. Another change in the patch is the new concept Decl Index, which means the index of the very big array `DeclsLoaded` in ASTReader. Previously, the index of a loaded declaration is simply the Decl ID minus PREDEFINED_DECL_NUMs. So there are some places they got used ambiguously. But this patch tried to split these two concepts. #### Overhead As https://github.com/llvm/llvm-project/pull/86912 did, the change will increase the on-disk PCM file sizes. As the declaration ID may be the most IDs in the PCM file, this can have the biggest impact on the size. In my experiments, this change will bring 6.6% increase of the on-disk PCM size. No compile-time performance regression observed. Given the benefits in the motivation example, I think the cost is worthwhile.
-
Stephan T. Lavavej authored
[P2231R1](https://wg21.link/P2231R1) "Missing `constexpr` in `std::optional` and `std::variant`" was accepted as a C++20 Defect Report, not a C++17 Defect Report. Accordingly, `test_empty_emplace()` and `check_reset()` should be marked as `TEST_CONSTEXPR_CXX20`. Note that their `static_assert`s are properly guarded: https://github.com/llvm/llvm-project/blob/4ce65423be0ba1d90c11b6a79981d6314e1cf36d/libcxx/test/std/utilities/optional/optional.object/optional.object.assign/emplace.pass.cpp#L270-L272 https://github.com/llvm/llvm-project/blob/4ce65423be0ba1d90c11b6a79981d6314e1cf36d/libcxx/test/std/utilities/optional/optional.object/optional.object.mod/reset.pass.cpp#L53-L55 Found while running libc++'s tests with MSVC's STL, as we activate our `constexpr` here for C++20 and above.
-
Owen Pan authored
-
David Green authored
-