aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
38 hours[libc++] Decouple iterator_traits test from precise Clang diagnostics (#107478)Louis Dionne2-123/+132
This makes the test more robust and prevents it from breaking when the diagnostic changes subtly (e.g. under modules).
38 hours[Vectorize] Fix a warningKazu Hirata1-2/+1
This patch fixes: llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp:1278:12: error: unused variable 'Op0' [-Werror,-Wunused-variable]
38 hours[libc++][modules] Introduce a forward-declaration for std::byte (#107402)Louis Dionne6-1/+34
We need a forward-declaration so that we can know about std::byte from some type traits without having to include std::byte's definition, which (circularly) depends back on type traits.
38 hours[libc++][modules] Tweak a few includes (#107467)Louis Dionne18-32/+17
Add a few missing includes, remove two unnecessary ones and use __cstddef/size_t.h instead of <cstddef> in a few places. This is a collection of miscellaneous findings that collectively unblock other modularization patches.
38 hours[LLDB] Reappply SBSaveCore AddMemoryList (#107159)Jacob Lalonde25-67/+496
Reapplies #106293, testing identified issue in the merging code. I used this opportunity to strip CoreFileMemoryRanges to it's own file and then add unit tests on it's behavior.
38 hours[Minidump] Support multiple exceptions in a minidump (#107319)Jacob Lalonde5-21/+153
A fork of #97470, splitting off the LLVM changes from the LLDB specific changes. This patch enables a minidump file to have multiple exceptions, exposed via an iterator of Expected streams.
38 hours[libc] Fix unit test compile flags propagation. (#106128)lntue9-32/+74
With this change, I was able to build and test for aarch64 & riscv64 on x86-64 host as follow: Pre-requisite: - cross build toolchain for aarch64 ``` $ sudo apt install binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu g++-aarch64-linux-gnu ``` - cross build toolchain for riscv64 ``` $ sudo apt install binutils-riscv64-linux-gnu gcc-riscv64-linux-gnu g++-riscv64-linux-gnu ``` - qemu user: ``` $ sudo apt install qemu qemu-user qemu-user-static ``` CMake invocation: ``` $ cmake ../runtimes -GNinja -DLLVM_ENABLE_RUNTIMES=libc -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DLIBC_TARGET_TRIPLE=<aarch64-linux-gnu/riscv64-linux-gnu> -DCMAKE_BUILD_TYPE=Release -DLIBC_TEST_COMPILE_OPTIONS_DEFAULT="-static" $ ninja libc $ ninja check-libc ```
38 hours[bazel] Add missing dependencies for b8d6885ff67efbc3142a2b49506ed0cc2b95e054Benjamin Kramer2-0/+2
39 hours[LV] Support binary and unary operations with EVL-vectorization (#93854)Kolya Panchenko11-162/+2122
The patch adds `VPWidenEVLRecipe` which represents `VPWidenRecipe` + EVL argument. The new recipe replaces `VPWidenRecipe` in `tryAddExplicitVectorLength` for each binary and unary operations. Follow up patches will extend support for remaining cases, like `FCmp` and `ICmp`
39 hours[LSR] Do not create duplicated PHI nodes while preserving LCSSA form (#107380)Sergey Kachkov7-44/+162
Motivating example: https://godbolt.org/z/eb97zrxhx Here we have 2 induction variables in the loop: one is corresponding to i variable (add rdx, 4), the other - to res (add rax, 2). The second induction variable can be removed by rewriteLoopExitValues() method (final value of res at loop exit is unroll_iter * -2); however, this doesn't happen because we have duplicated LCSSA phi nodes at loop exit: ``` ; Preheader: for.body.preheader.new: ; preds = %for.body.preheader %unroll_iter = and i64 %N, -4 br label %for.body ; Loop: for.body: ; preds = %for.body, %for.body.preheader.new %lsr.iv = phi i64 [ %lsr.iv.next, %for.body ], [ 0, %for.body.preheader.new ] %i.07 = phi i64 [ 0, %for.body.preheader.new ], [ %inc.3, %for.body ] %inc.3 = add nuw i64 %i.07, 4 %lsr.iv.next = add nsw i64 %lsr.iv, -2 %niter.ncmp.3.not = icmp eq i64 %unroll_iter, %inc.3 br i1 %niter.ncmp.3.not, label %for.end.loopexit.unr-lcssa.loopexit, label %for.body, !llvm.loop !7 ; Exit blocks for.end.loopexit.unr-lcssa.loopexit: ; preds = %for.body %inc.3.lcssa = phi i64 [ %inc.3, %for.body ] %lsr.iv.next.lcssa11 = phi i64 [ %lsr.iv.next, %for.body ] %lsr.iv.next.lcssa = phi i64 [ %lsr.iv.next, %for.body ] br label %for.end.loopexit.unr-lcssa ``` rewriteLoopExitValues requires %lsr.iv.next value to have only 2 uses: one in LCSSA phi node, the other - in induction phi node. Here we have 3 uses of this value because of duplicated lcssa nodes, so the transform doesn't apply and leads to an extra add operation inside the loop. The proposed solution is to accumulate inserted instructions that will require LCSSA form update into SetVector and then call formLCSSAForInstructions for this SetVector once, so the same instructions don't process twice.
39 hours[orc] Avoid pathological propogation order (#107488)Ben Langmuir1-3/+4
In certain pathological object files we were getting extremely slow linking because we were repeatedly propogating dependencies to the same blocks instead of accumulating as many changes as possible. Change the order of iteration so that we go through every node in the worklist before returning to any previous node, reducing the number of expensive dependency iterations. In practice, this took one case from 60 seconds to 2 seconds. Note: the performance is still non-deterministic, because the block order itself is non-deterministic. rdar://133734391
39 hoursAdd usub_cond and usub_sat operations to atomicrmw (#105568)anjenner48-72/+3955
These both perform conditional subtraction, returning the minuend and zero respectively, if the difference is negative.
39 hours[Attributor] Skip AS specialization for volatile memory instructions (#107250)Shilei Tian6-94/+223
40 hours[mlir] Avoid repeated hash lookups (NFC) (#107519)Kazu Hirata1-3/+3
40 hours[clang-tidy] Add type annotations to add_new_check.py, fix minor bug (#106801)Nicolas van Kempen1-38/+53
``` > python3 -m mypy --strict clang-tools-extra/clang-tidy/add_new_check.py Success: no issues found in 1 source file ``` Also fix a bug when `--standard` is not provided on the command line: the generated test case has a `None` causing issues: ``` > python3 clang-tools-extra/clang-tidy/add_new_check.py performance XXX Updating clang-tools-extra/clang-tidy/performance/CMakeLists.txt... Creating clang-tools-extra/clang-tidy/performance/XxxCheck.h... Creating clang-tools-extra/clang-tidy/performance/XxxCheck.cpp... Updating clang-tools-extra/clang-tidy/performance/PerformanceTidyModule.cpp... Updating clang-tools-extra/docs/ReleaseNotes.rst... Creating clang-tools-extra/test/clang-tidy/checkers/performance/XXX.cpp... Creating clang-tools-extra/docs/clang-tidy/checks/performance/XXX.rst... Updating clang-tools-extra/docs/clang-tidy/checks/list.rst... Done. Now it's your turn! > head -n 1 clang-tools-extra/test/clang-tidy/checkers/performance/XXX.cpp // RUN: %check_clang_tidy None%s performance-XXX %t ```
40 hours[mlir] Avoid repeated hash lookups (NFC) (#107518)Kazu Hirata1-7/+4
40 hours[NFC] Add explicit #include llvm-config.h where its macros are used, clang ↵Daniil Fukalov11-0/+12
part. (#107301) (this is clang related part) Without these explicit includes, removing other headers, who implicitly include llvm-config.h, may have non-trivial side effects. For example, `clagd` may report even `llvm-config.h` as "no used" in case it defines a macro, that is explicitly used with #ifdef. It is actually amplified with different build configs which use different set of macros.
40 hours[Convergence] Avoid repeated hash lookups (NFC) (#107515)Kazu Hirata1-3/+2
40 hours[IndVars] Avoid repeated hash lookups (NFC) (#107513)Kazu Hirata1-4/+2
40 hours[IRSim] Avoid repeated hash lookups (NFC) (#107510)Kazu Hirata1-10/+6
40 hoursReapply "AtomicExpand: Allow incrementally legalizing atomicrmw" (#107307)Matt Arsenault6-149/+162
This reverts commit 63da545ccdd41d9eb2392a8d0e848a65eb24f5fa. Use reverse iteration in the instruction loop to avoid sanitizer errors. This also has the side effect of avoiding the AArch64 codegen quality regressions. Closes #107309
40 hours[Clang][AArch64] Fix -Wcovered-switch-default warning (SemaARM)Spencer Abson2-3/+1
40 hoursAMDGPU: Update live intervals in convertToThreeAddress (#104610)Matt Arsenault2-26/+156
Fixes #98741
40 hours[MLIR][LLVM][NFC] Remove dead interface and add namespace qualifiers (#107573)Johannes de Fine Licht3-75/+19
The `GetResultPtrElementType` interface is dead now that MLIR has fully moved to opaque pointers, and can be removed. Add namespace qualifiers to all argument types and return types of interface methods for when they're used outside of LLVM dialect.
40 hours[analyzer] Model constructor initializer for an array member (#107537)Arseniy Zaostrovnykh3-14/+77
Bind the array member to the compound region associated with the initializer list, e.g.: class C { int arr[2]; C() : arr{1, 2} {} }; C c; This change enables correct values in `c.arr[0]` and `c.arr[1]` CPP-5647
40 hours[AArch64] Prevent generating tbl instruction instead of smull (#106375)Igor Kirillov2-0/+158
Generating tbl instruction for zext in an expression like: mul(zext(i8), sext) is not optimal. Instead, allowing later optimisations to generate smull(zext, sext) would do some of the type extensions implicitly and be faster.
41 hours[AArch64] Add more type combinations to vector fp conversion cost tests.Florian Hahn2-110/+227
Generealize test coverage for https://github.com/llvm/llvm-project/pull/107303 Also adjust the name to reflect the fact that it is not limited to vectorrs with 3 elements now.
41 hours [InstCombine] Fold `[l|a]shr iN (X-1)&~X, N-1 -> [z|s]ext(X==0)` (#107259)Yingwei Zheng2-0/+213
Alive2: https://alive2.llvm.org/ce/z/kwvTFn Closes #107228. `ashr iN (X-1)&~X, N-1` also exists. See https://github.com/dtcxzyw/llvm-opt-benchmark/issues/1274.
41 hours[X86] LowerSelect - generalize "select icmp(x,0), lhs, rhs" folding ↵Simon Pilgrim3-92/+83
patterns. (#107272) We have many cases where the condition is a "(and x, 1)" pattern (e.g. from a bool argument or some other simplified bitlogic), and we have a large number of existing generic/x86 patterns that make use of this (and trying to convert to a SETCC node can cause infinite loops). Use the LowerSELECTWithCmpZero helper, simulating the comparison with adjusted operands.
41 hoursFix typo in test.Akash Banerjee1-1/+1
41 hours[clang] Fix noisy -Wcovered-switch-default warning after 1f70fcefa9 / #100278Nico Weber1-2/+0
41 hours[bazel] port 1f70fcefa981e6e2bBenjamin Kramer1-0/+36
42 hours[MC] Emit a jump table size section (#101962)Nabeel Omer10-0/+298
This patch will make LLVM emit a new section .llvm_jump_table_sizes containing tuples of (jump table address, entry count) in object files. This section is useful for tools that need to statically reconstruct the control flow of executables. At the moment this is only enabled by default for the PS5 target.
42 hours[gn] port 1f70fcefa981e6e2bNico Weber2-0/+6
42 hours[clang] Pass -c to clang in test/Driver/Ofast.cNico Weber1-9/+9
Without this, `-###` prints the linker invocation as well, which can lead to `-Wno-msvc-not-found` warnings on Windows bots that don't have MSVC on path, causing the test to fail. Since the test isn't trying to test linker-related things, just pass `-c`. See discussion on #98736.
42 hours[clang][bytecode] Implement comparsion operators for vector type (#107258)yronglin3-5/+310
Implement ==, !=, <, <=, >, >= comparsion operators for vector type. --------- Signed-off-by: yronglin <yronglin777@gmail.com>
42 hours[DAG] Add support for neg(abd(x,y)) patterns.Simon Pilgrim4-132/+154
Currently limited to cases which have legal/custom ABDS/ABDU handling - I'll extend this for all targets in future (similar to how we support neg(abs(x))) once I've addressed some outstanding regressions on aarch64/riscv. Helps avoid a lot of extra cmov instructions on x86 in particular, and allows us to more easily improve the codegen in future commits.
42 hours[Clang][AArch64] Add customisable immediate range checking to NEON (#100278)SpencerAbson47-1460/+7792
This patch moves NEON immediate argument specification and checking to the system currently shared by both SVE and SME. In its current form, the TableGen definition of a NEON intrinsic cannot control how its immediate arguments are range-checked, this information must be inferred from the name of the intrinsic by NeonEmitter, which also assumes that any NEON instruction will only ever receive a single immediate argument. For SVE/SME instrinsics, this information is more conveniently supplied in the TableGen definition. As a result, for each immediate argument, NEON instructions must define - The index of the immediate argument to be checked - The type of immediate range check to be performed, (e.g., ImmCheckShiftRight) - The index of the argument whose type defines the context of this immediate check (base type, vector size). - **Difference from SVE/SME** If this definition generates a polymorphic NEON builtin, the base type defined by this argument is overwritten by that of the type code supplied to the overloaded builtin call. This third argument is omitted in some cases due to this. Here is an example for [`vfma_laneq`](https://developer.arm.com/architectures/instruction-sets/intrinsics/#f:@navigationhierarchiessimdisa=[Neon]&q=vfma_laneq) - The immediate is supplied in argument 3 - The immediate is used as an index into the lanes of argument 2 - So we must perform an immediate check on argument 3, based on the type information of argument 2. - `ImmCheck<3, ImmCheckLaneIndex, 2>` During this work, we discovered that the existing immediate range-checking system was largely untested, which made it difficult to make reliable progress. Missing tests have been added to verify this implementation against all intrinsics which take constrained immediate arguments. All test immediate range checking tests for NEON intrinsics are moved to a dedicated directory `clang/test/Sema/aarch64-neon-immediate-ranges/`.
42 hours[lldb][NFC] Used shared_fd_t (#107553)Dmitry Vasilyev8-27/+30
Replaced `int connection_fd = -1` with `shared_fd_t connection_fd = SharedSocket::kInvalidFD`. This is prerequisite for #104238.
42 hours[flang] lower SPACING f16/bf16 to new runtime APIs (#107541)jeanPerier2-8/+33
Use APIs added in https://github.com/llvm/llvm-project/pull/106575 This is needed to fix HDF5 builds that are blocked by SPACING TODOs for REAL(2) and currently needs manual hacks.
43 hours[X86][MC] Cont. update for AVX10.2-BF16 (#107529)Freddy Ye2-5/+2
Not an expert in this code, but looks like it fixed the crash for us. Picking it up.
43 hours[TBAA] Fix the case where a subobject gets accessed at a non-zero offset. ↵Ivan Kosarev2-6/+26
(#101485)
43 hours[clang-tidy] fix misc-unconventional-assign-operator false positive for ↵Congcong Cai3-3/+26
deducing this (#107409) Fixes: #107119 When meeting c++23 deducing this, we should skip the first parameter
43 hours[DebugInfo][AIX] XFAIL debug-ranges-duplication.ll (#107525)Jake Egan1-0/+3
The test fails with `Assertion failed: Section && "Cannot switch to a null section!"` because of unsupported DWARF 5 section.
43 hoursAffineExpr: Fix result of d0 + (d0 // -c) * c. (#107530)Johannes Reifferscheid2-1/+21
Currently, this is rewritten to d0 mod -c. However, we do not support modulo with a negative RHS in our lowering passes, so this triggers undefined behavior. It would be better to not have these ad hoc simplifications at all, but I guess that ship has sailed.
44 hours[lldb] Fixed a typo in #107388Dmitry Vasilyev1-1/+1
44 hours[clang] Emit -Wdangling diagnoses for cases where a gsl-pointer is construct ↵Haojian Wu3-12/+44
from a gsl-owner object in a container. (#104556) The warning is not emitted for the case `string_view c = std::vector<std::string>({""}).at(0);` because we bail out during the visit of the LHS at [this point](https://github.com/llvm/llvm-project/blob/5d2c324fea2d7cf86ec50e4bb6b680acf89b2ed5/clang/lib/Sema/CheckExprLifetime.cpp#L341-L343) in the code. This bailout was introduced in [this commit](https://github.com/llvm/llvm-project/commit/bcd0798c47ca865f95226859893016a17402441e) to address a false positive with `vector<vector::iterator>({""}).at(0);`. This PR refines that fix by ensuring that, for initialization involving a gsl-pointer, we only consider constructor calls that take the gsl-owner object. Fixes #100384.
44 hours[AMDGPU] Skip lowerNonKernelLDSAccesses if function is declaration. (#106975)Chaitanya2-2/+100
This PR skips lowering non-kernel LDS i.e lowerNonKernelLDSAccesses, when function is a declaration or there are no lds globals to process.
44 hours[lldb][NFC] Fix -Wparentheses warning.Christian Sigg1-1/+1
Fix `using the result of an assignment as a condition without parentheses` warning.
45 hours[lsp] Fix format string in Reply (#107480)Lily Brown1-1/+1
PR #105745 requires that `formatv` calls have the correct number of arguments. This call to `Logger::info` was incorrect.