- May 15, 2023
-
-
Mark de Wever authored
This was discovered while working on modules. Reviewed By: #libc, philnik Differential Revision: https://reviews.llvm.org/D149351
-
Sergei Barannikov authored
Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D150520
-
- May 14, 2023
-
-
Ricky Zhou authored
-
Luo, Yuanke authored
We should not call tryOptimizeLEAtoMOV() in eliminateFrameIndex() when the base register is a virtual register, because tryOptimizeLEAtoMOV would assume the base register be physical register. Although we can also optimize LEA to MOV with virtual register, I'd like to leave the optimization in another patch. Differential Revision: https://reviews.llvm.org/D150521
-
Phoebe Wang authored
-
Serguei Katkov authored
If we know that zero constant operand is already in the right place we do not need to re-order anything. Reviewed By: e-kud Differential Revision: https://reviews.llvm.org/D150249
-
Uday Bondhugula authored
NFC. Add missing const on affine analysis utils ComputationSliceState methods. Differential Revision: https://reviews.llvm.org/D150523
-
Uday Bondhugula authored
Make isSliceValid const correct. NFC.
-
Phoebe Wang authored
-
Vitaly Buka authored
-
Joshua Cao authored
There was initially a msan report for use-of-uninitialized value due to a bug in https://reviews.llvm.org/D138526. find_iterator::Point is uninitialized for the default constructor of find_iterator, which is used by IntervalTree::end. This change is not required, but its good practice to make sure all class members are initialized. Differential Revision: https://reviews.llvm.org/D149698
-
Sam James authored
This reverts commit ce990b54. This breaks some build bots - specifically when using GCC to build LLVM and then -fno-lifetime-dse ends up passed to Clang in some tests like at https://lab.llvm.org/buildbot/#/builders/139/builds/40594. Bug: https://github.com/llvm/llvm-project/issues/24952 Bug: https://github.com/llvm/llvm-project/issues/57740 Differential Revision: https://reviews.llvm.org/D150505
-
Craig Topper authored
Previously, LegalizeVectorOps used the result VT while LegalizeDAG used the operand VT. This patch makes them both use the operand VT. This also makes it consistent with how the default cost model works. I've hacked the AArch64 cost model to maintain old behavior for some f16 vectors. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D149572
-
Ian Anderson authored
Module map generation for the private detail headers is easier done if each private header is by itself in a submodule. Move the __algorithm/pstl_backends into their own submodules. Reviewed By: philnik, #libc Differential Revision: https://reviews.llvm.org/D150503
-
Craig Topper authored
-
Xi Ruoyao authored
LLVM data structures like llvm::User and llvm::MDNode rely on the value of object storage persisting beyond the lifetime of the object (#24952). This is not standard compliant and causes a runtime crash if LLVM is built with GCC and LTO enabled (#57740). Until these issues are fixed, we need to disable dead store eliminations eliminations based on object lifetime. Bug: https://github.com/llvm/llvm-project/issues/24952 Bug: https://github.com/llvm/llvm-project/issues/57740 Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106943 (This was originally committed as 94f7c961 but I reverted it in b974991f4c4457a2104b648d9797a0ed438ecc9 to fix authorship.) Reviewed By: MaskRay, thesamesam, nikic Differential Revision: https://reviews.llvm.org/D150505 Signed-off-by:
Sam James <sam@gentoo.org>
-
Sam James authored
This reverts commit 94f7c961. Differential Revision: https://reviews.llvm.org/D150505
-
Fangrui Song authored
The bit fields have plent of spare bits. Just reserve one for HasName so that we can access Fragment without bitwise operations. Fragment is commonly accessed. This change makes my x86-64 release build 5KiB smaller.
-
Nikolas Klauser authored
Reviewed By: #libc, ldionne, Mordante Spies: Mordante, libcxx-commits Differential Revision: https://reviews.llvm.org/D150421
-
Thurston Dang authored
Various ASan interceptors may corrupt memory if passed a pointer to freed memory (https://github.com/google/sanitizers/issues/321). This patch fixes the issue for the backtrace interceptor, by calling REAL(backtrace) with a known-good scratch buffer, and performing an addressability check on the user-provided buffer prior to writing to it. Differential Revision: https://reviews.llvm.org/D150496
-
Aiden Grossman authored
This patch changes two instances of an ampersand to a written out and for more consistency with the rest of the file and brevity. In addition, the last `cmake --build` reference is removed, again for consistency with the rest of the file which shows the ninja invocations. This cmake invocation also passed in the `--parallel` flag which doesn't make sense with ninja using all threads by default. This was changed in the previous patch to touch this line (https://reviews.llvm.org/D88990), but if we want to change this, it should be done across the entire file.
-
Noah Goldstein authored
The current logic is pretty limitted unless the `Op` is a constant. This at least covers more obvious cases. Reviewed By: craig.topper, foad Differential Revision: https://reviews.llvm.org/D149196
-
Noah Goldstein authored
Both of these functions recursively call themselves so it makes sense to limit that upper bound. Differential Revision: https://reviews.llvm.org/D149195
-
Noah Goldstein authored
This is generally handled already in early CSE. If a specialized pipeline is used, however, its possible for `i1` operand with known-zero denominator to slip through. Generally the known-zero denominator is caught and poison is returned, but if it is indirect enough (known zero through a phi node) we can miss this case in `InstructionSimplify` and then miss handling `i1`. This is because `i1` is current handled with the following check: `if(Known.countMinLeadingZeros() == Known.getBitWidth() - 1)` which only works on the assumption we don't know the denominator to be zero. If we know the denominator to be zero, this check fails: https://github.com/llvm/llvm-project/issues/62607 This patch simply adds an explicit `if(Known.isZero) return poison;` which fixes the issue. Alive2 Link for tests: https://alive2.llvm.org/ce/z/VTw54n Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D150142 -
Noah Goldstein authored
We can detect the case under the following circumstances: Take `(Pow2_Ceil(C1) - (1 << C0))` as `C2`. 1) `C2` is NOT a power of 2. 2) `C2 + LeastSignificantBit(C2)` is a nonzero power of 2. 3) `C2 u>= C1` The motivation is the middle end transforms: `(-x << C0) & C1` to `(x * (Pow2_Ceil(C1) - (1 << C2))) & C1` As it saves IR instructions. On X86 the two instruction, `sub` and `shl`, and better than the `mul` so we want to undo the transform. This comes up when shifting a bit-mask by a byte-misalignment i.e: `y << ((-(uintptr)x * 8) & 63)` Alive2 Proofs (including all cases with undefs in the vector): https://alive2.llvm.org/ce/z/f-65b6 Reviewed By: RKSimon, pengfei Differential Revision: https://reviews.llvm.org/D150294 -
Noah Goldstein authored
Differential Revision: https://reviews.llvm.org/D150293
-
Sam James authored
LLVM data structures like llvm::User and llvm::MDNode rely on the value of object storage persisting beyond the lifetime of the object (#24952). This is not standard compliant and causes a runtime crash if LLVM is built with GCC and LTO enabled (#57740). Until these issues are fixed, we need to disable dead store eliminations eliminations based on object lifetime. Bug: https://github.com/llvm/llvm-project/issues/24952 Bug: https://github.com/llvm/llvm-project/issues/57740 Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106943 Reviewed By: MaskRay, thesamesam, nikic Differential Revision: https://reviews.llvm.org/D150505
-
Amir Ayupov authored
Leverage perf-training flow for BOLT profile collection, enabling reproducible BOLT optimization. Remove the use of bootstrapped build for profile collection. Test Plan: - Regular (single-stage) build ``` $ cmake ... -C .../clang/cmake/caches/BOLT.cmake $ ninja clang-bolt ... [21/24] Instrumenting clang binary with BOLT [21/24] Generating BOLT profile for Clang [23/24] Merging BOLT fdata Profile from 2 files merged. [24/24] Optimizing Clang with BOLT ... 1291202496 : executed instructions (-1.1%) 27005133 : taken branches (-71.5%) ... ``` - Two stage build (ThinLTO+InstPGO) ``` $ cmake ... -C .../clang/cmake/caches/BOLT.cmake -C .../clang/cmake/caches/BOLT-PGO.cmake $ ninja clang-bolt $ ninja stage2-clang-bolt ... [2756/2759] Instrumenting clang binary with BOLT [2756/2759] Generating BOLT profile for Clang [2758/2759] Merging BOLT fdata [2759/2759] Optimizing Clang with BOLT ... BOLT-INFO: 7092 out of 184104 functions in the binary (3.9%) have non-empty execution profile 756531927 : executed instructions (-0.5%) 15399400 : taken branches (-40.3%) ... ``` Reviewed By: beanz Differential Revision: https://reviews.llvm.org/D143553
-
- May 13, 2023
-
-
Nico Weber authored
-
Florian Hahn authored
Split off from D143938. This moves the planning logic to select the vectorization factor to LoopVectorizationPlanner as a step towards only computing costs for individual VFs in LoopVectorizationCostModel and do planning in LVP. Reviewed By: Ayal Differential Revision: https://reviews.llvm.org/D150197
-
Florian Hahn authored
-
Uday Bondhugula authored
NFC. Pass affine copy options by const ref. Differential Revision: https://reviews.llvm.org/D150507
-
Mark de Wever authored
The owner of the last two failing buildbots updated CMake. This reverts commit e8e8707b.
-
Job Noorman authored
The reason for this patch is to allow the MCDisassembler used in tests to disassemble instructions that are only available when a specific feature is enabled. For example, on RISC-V it's currently not possible to use decode_operand() on a compressed instruction. This patch fixes this. Reviewed By: lhames Differential Revision: https://reviews.llvm.org/D149523
-
Mark de Wever authored
Like done D149543 this validates the other formatter specializations. Reviewed By: #libc, ldionne Differential Revision: https://reviews.llvm.org/D150041
-
Florian Hahn authored
Split off refactoring from D150197 to reduce diff.
-
Aiden Grossman authored
Currently, there is no documentation on what platforms and architectures llvm-exegesis is supported on. This patch adds in user-facing documentation in the CommandGuide about what architectures are supported as well as developer facing documentation detailing the technical reasons for why certain platforms are supported and some aren't. This is a follow-up after discussion in https://discourse.llvm.org/t/clarification-on-platform-support-for-llvm-exegesis/70206. Reviewed By: kpdev42 Differential Revision: https://reviews.llvm.org/D149378
-
Aiden Grossman authored
The Assembler tests have been disabled for years in tree and at this point don't test anything other than common MC infrastructure that is already tested in other parts of the tree. This patch removes them due to the mentioned reasons. Reviewed By: courbet Differential Revision: https://reviews.llvm.org/D149819
-
Aiden Grossman authored
This patch fixes the man page build. It currently doesn't work as SOURCE_DIR isn't set correctly (just undefined) within the add_sphinx_target function. This patch also moves around the creation of targets for autogenerated rst files so that both the man page and html build can depend upon them as before only the html build depended on them. Fixes #62540 Reviewed By: tstellar Differential Revision: https://reviews.llvm.org/D149809
-
Florian Hahn authored
At the moment, lower-matrix-intrinsics accepts mis-matches between shapes for operations. See shape-verification.ll for an example where @llvm.matrix.column.major.load specifies 6x1 and then the use (@llvm.matrix.multiply) specifies the operand to have 1x6. This patch adds verification for shapes to check if shapes match. Reviewed By: thegameg Differential Revision: https://reviews.llvm.org/D147438
-