- Sep 16, 2023
-
-
Antonio Frighetto authored
Extend folding for `2^n` euclidean division remainder operations on signed integers by handling the specific instance in which one `select` arm has already been replaced by 1. Reported-By: HypheX Fixes: https://github.com/llvm/llvm-project/issues/66417.
-
Yingwei Zheng authored
See also https://reviews.llvm.org/D156238#inline-1546774
-
Yingwei Zheng authored
This patch avoids creating (sub x0, rhs) when lowering atomic_load_sub with a constant rhs. Comparison with GCC: https://godbolt.org/z/c5zPdP7j4 Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D158673
-
cor3ntin authored
-
Fangrui Song authored
This is natural and matches GNU ld.
-
Fangrui Song authored
For `c-header` and `c++-header` inputs, Clang driver selects the `-emit-pch` frontend action and defaults the output suffix name to `.gch` (except clang-cl, which uses `.pch`) to follow GCC. ``` clang -c a.h # a.h.gch clang -xc++-header -c a.h # a.h.gch ``` In every other place we prefer `.pch` to `.gch`. E.g. `-include a.h` probes `a.h.pch` before `a.h.gch`, and we have `-include-pch` instead of `-include-gch`. (Clang and GCC use different extension names for C++ modules as well.) This change isn't disruptive because: * Most newer build systems specify explicit output filenames and are unaffected * Implicit output name users almost assuredly use something like `-include a.h`, which probes both `a.h.pch` and `a.h.gch`[^1] [^1]: In the future, we shall stop probing `a.h.gch` for `-include a.h` as the compatibility intended behavior actually gets in the way (https://discourse.llvm.org/t/how-to-have-clang-ignore-gch-directories/51835). This patch is a prerequisite.
-
Vitaly Buka authored
-
Vitaly Buka authored
-
Vitaly Buka authored
-
Piotr Zegar authored
Extracted some code from a clangTidyMain function into separate functions.
-
Fangrui Song authored
-
Vitaly Buka authored
AppendF actually appends "<null>" which is not needed here.
-
Vitaly Buka authored
-
Vitaly Buka authored
-
Fangrui Song authored
-
Fangrui Song authored
-
Vitaly Buka authored
-
Fangrui Song authored
.plt and .branch_lt have the type of SHT_NOBITS and may be relocated by dynamic relocations with non-zero addends. They should be skipped for the --check-dynamic-relocations check, as --apply-dynamic-relocs does not apply. A side effect is that -z rel does not work for the two sections. Added two --apply-dynamic-relocs --check-dynamic-relocations tests. Also checked linking a PPC64 clang.
-
Fangrui Song authored
Fixes: 64c9dbbf
-
David Blaikie authored
(pretty sure we wrote this down in the style guide at some point)
-
Allen authored
Don't report 'Use #pragma loop distribute(enable) to allow loop distribution' when we already add #pragma clang loop distribute(enable) Fixes https://github.com/llvm/llvm-project/issues/64637
-
Fangrui Song authored
Most targets support --check-dynamic-relocations --apply-dynamic-relocs, so it makes sense to invert the condition. We want new ports to support getImplicitAddend.
-
Fangrui Song authored
GNU ld added ^= support in July 2023.
-
Fangrui Song authored
The special cases added by https://reviews.llvm.org/D42911 (defsym-reserved-syms.s) are unneeded after https://reviews.llvm.org/D66717
-
Vitaly Buka authored
Prepare to introduce trivial InternalScopedString::Append(const char*).
-
Philip Reames authored
If the data type is larger than e16, and the requires more than LMUL1 register class, prefer the use of vrgatherei16. This has three major benefits: 1) Less work needed to evaluate the constant for e.g. vid sequences. Remember that arithmetic generally scales lineary with LMUL. 2) Less register pressure. In particular, the source and indices registers *can* overlap so using a smaller index can significantly help at m8. 3) Smaller constants. We've got a bunch of tricks for materializing small constants, and if needed, can use a EEW=16 load.
-
Philip Reames authored
If we have a gather or a scatter whose index describes a permutation of the lanes, we can lower this as a shuffle + a unit strided memory operation. For RISCV, this replaces a indexed load/store with a unit strided memory operation and a vrgather (at worst). I did not bother to implement the vp.scatter and vp.gather variants of these transforms because they'd only be legal when EVL was VLMAX. Given that, they should have been transformed to the non-vp variants anyways. I haven't checked to see if they actually are.
-
Craig Topper authored
Some instruction selection patterns required for ALU GPR instructions have already been automatically imported from existing TableGen descriptions - this patch simply adds testing for them. The first of the GIComplexPatternEquiv definitions required to select the shiftMaskXLen ComplexPattern has been added. Some instructions require special handling due to i32 not being a legal type on RV64 in SelectionDAG so we can't reuse SelectionDAG patterns. Co-authored-by:
Lewis Revill <lewis.revill@embecosm.com> Reviewed By: nitinjohnraj Differential Revision: https://reviews.llvm.org/D76445
-
Markus Böck authored
The current regex for the `mlir:core` PR label is too accepting. It uses `**` as a prefix for all paths, which allows any kind of directory prefix to be inserted when matching. Combined with very common directory suffixes such as `IR` and `Transforms`, it leads to many false positives of being applied to PRs that do not touch MLIR core such as https://github.com/llvm/llvm-project/pull/66520 This PR therefore changes the `mlir:core` labels to only include the specified top-level directories if directly nested under either `lib` for source files, or `include` for header files
-
LLVM GN Syncbot authored
-
William Junda Huang authored
This is the patch at https://reviews.llvm.org/D153692, migrating to Github After testing D147740 with multiple industrial projects with ~10 million FunctionSamples, no MD5 collision has been found. In perfect hashing, the probability of collision for N symbols over K possible hash value is 1 - K!/((K-N)! * K^N). When N is 1 million and K is 2^64, the probability is 3*10^-8, when N is 10 million the probability is 3*10^-6, so we are probably not going to find an actual case in real world application. (However if K is 2^32, the probability of collision is almost 1, this is indeed a problem, if anyone still use a large profile on 32-bit machine, as hash_code is tied to size_t). Furthermore, when a collision happens we can't do anything to recover it, unless using a multi-map, but that is significantly slower, which contradicts the purpose of optimizing the profile reader. One more thing, since we have been using profiles with MD5 names, and they have to be coming from non-MD5 sources, so if hash collision is to happen, it already happened when we convert a non-MD5 profile to a MD5 one, so there's no point to check for that in the reader, and this feature can be removed.
-
Andrés Villegas authored
Reason: Not including appropiated headers for sanitizer_symbolizer_markup.cpp which only runs in fuchsia. This reverts commit d4152c5c.
-
Philip Reames authored
In D154687, we added a transform to narrow indexed load/store indices of the form (shl (zext), C). We can move this into a generic transform over the target independent nodes instead, and pick up the fixed vector cases with no additional work required. This is an alternative to D158163. Performing this transform points out that we weren't eliminating zero_extends via the the generic DAG combine. Adjust the (existing) callbacks so that we do. This change *removes* the existing transform on the target specific intrinsic nodes. If anyone has a use case this impacts, please speak up. Note: Reviewed as part of a stack of changes in PR# 66405.
-
Philip Reames authored
If the index type is greater or equal to XLEN, then signed and unsigned are the same. Canonacalize towards unsigned to simplify upcoming transform. Note: Reviewed as part of a stack of changes in PR# 66405.
-
Philip Reames authored
Note: Reviewed as part of a stack of changes in PR# 66405.
-
Siva Chandra authored
-
Mircea Trofin authored
Post - D156491 or cbdccb30. Just re-based reference outputs.
-
Louis Dionne authored
-
Mitch Phillips authored
This test asserts that HWASan memory usage can be gathered from /proc/$PID/maps. This worked because the old Android-specific versions of the anonymous mmap patches functioned by providing a userland cstring pointer to the kernel, and the underlying cstring was collected from that pointer address dynamically when /proc/$PID/maps was being decorated. This had some obvious flaws, you had to keep the string around for the lifetime of the program. Now, the official kernel implementation of this is to copy the string into a kernel struct at prctl()-time. Thus, the name that you give at prctl()-time sticks around and can't be changed by userspace outside of another prctl call. This breaks the feature, but this is fine, it's not like anyone's really relying on it anyway. So, let's make sure we don't continue failing the test on new versions of Android where the kernel has the upstream version of the named-anonymous-mappings work.
-
Owen Pan authored
See https://reviews.llvm.org/D136154#3890747 for context. Fixes part of #58592.
-