- Jun 03, 2024
-
-
Shilei Tian authored
-
jeanPerier authored
Lower to IsAssumedSize runtime call in `--fir-assumed-rank-op` pass.
-
Simon Pilgrim authored
Noticed while triaging the failures on #93673
-
Nikita Popov authored
FirstCand is a reference to RepeatedSequenceLocs[0]. However, that vector is being modified a lot throughout the function, including one place that reassigns the whole vector. I'm not sure whether this can really happen in practice, but it doesn't seem unlikely that this could lead to a use-after-free. Avoid this by directly using RepeatedSequenceLocs[0] at the start of the function (as a lot of other places already do) and only creating FirstCand at the end where no more modifications take place.
-
Nikita Popov authored
Replace argmemonly readonly with memory(argmem: read).
-
Ilya Biryukov authored
Particular example that lead to this is a very long chain of `UsingShadowDecl`s that we hit in our codebase in generated code. To avoid that, check for stack exhaustion when deserializing the declaration. At that point, we can point to source location of a particular declaration that is being deserialized.
-
zhijian lin authored
reorganize the PPCInstrP10.td based on comment https://github.com/llvm/llvm-project/pull/92543#discussion_r1610908205 The instructions or patterns defined by same predicates are currently placed at several different locations , They will be reorganized into same group based on these predicates in the patch.
-
Yaxun (Sam) Liu authored
The std::min behaves like 'a<b?a:b', which does not match libstdc++/libc++ behavior like 'b<a?b:a' when input is NaN. Make it consistent with libstdc++/libc++. Fixes: https://github.com/llvm/llvm-project/issues/93962 Fixes: https://github.com/ROCm/HIP/issues/3502
-
Luke Lau authored
As noted in https://github.com/llvm/llvm-project/pull/93796#issuecomment-2142752336, a better way to teach RISCVInsertVSETVLI to work without LiveIntervals is to set VNInfo to nullptr and teach the various methods to handle it. We should try that approach first, so we no longer need this pre-commit patch. This reverts commit 4b4d3665.
-
Xuan Zhang authored
This reduce the time complexity of the main loop of `findCandidates()` method from $O(n^2)$ to $O(n \log n)$. For small $n$, the modification does not regress the build time, but it helps significantly when $n$ is large. For one application, this reduces the runtime of the main loop from 120 seconds to 28 seconds. This is the first commit for an enhanced version of machine outliner -- see [RFC](https://discourse.llvm.org/t/rfc-enhanced-machine-outliner-part-1-fulllto-part-2-thinlto-nolto-to-come/78732).
-
Simon Pilgrim authored
Fix typos in AGGRESIVE-->AGGRESSIVE + WAYAGGRESIVE->WAYAGGRESSIVE This also exposed an issue that the WAYAGGRESSIVE run removed a block entirely, so the LABEL check was silently failing. Noticed while triaging the failures on #93673
-
Mike Crowe authored
Ensure that FormatStringConverter's constructor fails with a sensible error message rather than asserting if the format string is not a narrow string literal. Also, ensure that we don't even get that far in modernize-use-std-print and modernize-use-std-format by checking that the format string parameter is a char pointer. Fixes #92896
-
David Spickett authored
Since https://github.com/llvm/llvm-project/pull/80801 clang requires a template argument list after the use of the template keyword. https://lab.llvm.org/buildbot/#/builders/176/builds/10230 error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw] This fixes the instances found by the AArch64 Linux builds.
-
Angel Zhang authored
This PR tries to reland #93595 which was reverted in #93732 due to some issues. The original PR: - Add integration test for `vector.shuffle` and `vector.interleave` - Add `VectorToSPIRV` patterns to `GPUToSPIRVPass` Description of the issue: - https://github.com/llvm/llvm-project/pull/93595#issuecomment-2138541700 - Using either `vector.load` or `vector.store` in the kernel function will cause the validation layer to report an error - Trying to bypass the issue by using `memref.load` and `memref.store` to load/store individual elements from/to the vectors, and populate the vectors using `vector.insertelement` and `vector.extractelement` instead.
-
Phoebe Wang authored
Another bug fix for #83628.
-
Tomas Matheson authored
When FMV was added to AArch64, it added a dependency expansion step after the -cc1 command line was parsed but before Sema, in AArch64TargetInfo::initFeatureMap. One effect of this is that -target-features specified on the -cc1 command line had some level of incomplete and broken dependency expansion. Since then, many tests have been added which depend on this behaviour. The dependency expansion can be considered broken at this stage because dependency expansion is already performed by the driver to generate the -target-feature flags using an ExtensionSet. This class does dependency evaluation and then generates a flattened representation of the dependency graph in the form of -target-features, which are passed to -cc1 in an arbitrary order (determined by the order of bits in the bitset). Any dependency expansion done after -cc1 will be inherently contradictory. It is impossible to accurately treat negative features once the dependency graph has been flattened and the order randomised. This patch fixes a large number of those tests, specifically ones where only a dependent feature (e.g. -target-feature +sme2p1) was added to the test -cc1 command, and not the necessary dependencies (e.g. -target-feature +sme). See PR #93695 further details.
-
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>
-