Commit
3124618704c5a9d1442b75d6372307654fea0827
by clementval[fir] Add fir.gentypedesc conversion
Add conversion pattern for the GenTypeDescOp. Convert to a global constant with an addressof.
This patch is part of the upstreaming effort from fir-dev branch.
Reviewed By: kiranchandramohan
Differential Revision: https://reviews.llvm.org/D113766
Co-authored-by: Eric Schweitz <eschweitz@nvidia.com> Co-authored-by: Jean Perier <jperier@nvidia.com>
|
 | flang/test/Fir/convert-to-llvm-invalid.fir |
 | flang/lib/Optimizer/CodeGen/CodeGen.cpp |
Commit
51c0b6843a192ec3bb8d75047a74457a3171c6fc
by a.bataev[SLP][NFC]Add more tests for shuffles that can be optimized after SLP, NFC.
|
 | llvm/test/Transforms/SLPVectorizer/X86/diamond_broadcast_extra_shuffle.ll |
Commit
aa9bbb64becda3d74ae922b3c0c875649f4ebbce
by a.bataev[SLP]Adjust GEP indices types when trying to build entries.
Need to adjust the types of GEPs indices when building the tree entries/operands. Otherwise some of the nodes might differ and vectorizer is unable to correctly find them and count their cost.
Differential Revision: https://reviews.llvm.org/D113792
|
 | llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp |
Commit
6c3d7fd4c55cfacbf9536373857eb496b3cfedcf
by andrzej.warzynski[flang][CodeGen] Transform `fir.boxchar_len` to a sequence of LLVM MLIR
This patch extends the `FIRToLLVMLowering` pass in Flang by adding a hook to transform `fir.boxchar_len` to a sequence of LLVM MLIR instructions.
This is part of the upstreaming effort from the `fir-dev` branch in [1].
[1] https://github.com/flang-compiler/f18-llvm-project
Differential Revision: https://reviews.llvm.org/D113763
Originally written by: Co-authored-by: Eric Schweitz <eschweitz@nvidia.com>
|
 | flang/lib/Optimizer/CodeGen/CodeGen.cpp |
 | flang/test/Fir/convert-to-llvm-target.fir |
Commit
422cf2b506c1240def78b9a5e5b7f32abbcff243
by zibi[SystemZ][z/OS] Fix warnings from unsigned int to long in 32-bit mode
This patch fixes the warnings which shows up when libcxx library started to be compiled in 32-bit mode on z/OS. More specifically, the assignment from unsigned int to time_t aka long was flags as follows: ``` libcxx/include/c++/v1/__support/ibm/nanosleep.h:31:11: warning: implicit conversion changes signedness: 'unsigned int' to 'time_t' (aka 'long') [-Wsign-conversion] __sec = sleep(static_cast<unsigned int>(__sec)); ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ libcxx/include/c++/v1/__support/ibm/nanosleep.h:36:36: warning: implicit conversion changes signedness: 'unsigned int' to 'long' [-Wsign-conversion] __rem->tv_nsec = __micro_sec * 1000; ~ ~~~~~~~~~~~~^~~~~~ libcxx/include/c++/v1/__support/ibm/nanosleep.h:47:36: warning: implicit conversion changes signedness: 'unsigned int' to 'long' [-Wsign-conversion] __rem->tv_nsec = __micro_sec * 1000; ~ ~~~~~~~~~~~~^~~~~~ 3 warnings generated. ```
Here is a small test case illustrating the issue:
``` typedef long time_t ; unsigned int sleep(unsigned int ); int main() { time_t sec = 0; #ifdef FIX sec = static_cast<time_t>(sleep(static_cast<unsigned int>(sec))); #else sec = sleep(static_cast<unsigned int>(sec)); #endif } ``` clang++ -c -Wsign-conversion -m32 t.C ``` t.C:8:9: warning: implicit conversion changes signedness: 'unsigned int' to 'time_t' (aka 'long') [-Wsign-conversion] sec = sleep(static_cast<unsigned int>(sec)); ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Reviewed By: ldionne, #libc, Quuxplusone, Mordante
Differential Revision: https://reviews.llvm.org/D112837
|
 | libcxx/include/__support/ibm/nanosleep.h |
Commit
2e65c8e8db1887a39c9140b75a9f5bb892ddd93f
by jperier[flang] Allow write after non advancing read in IO runtime
1. To avoid overwriting the part of the record read in the non advancing read, the furtherPositionInRecord field must be set to the max of the furtherPositionInRecord and the positionInRecord at the beginning of the IO write.
2. To allow any further read to succeed after the write, the unit beganReadingRecord_ must be set to false when resetting the recordLength during the write, otherwise, recordLength will not be computed in further read and an assert is hit (at unit.cpp(398)).
The added unit test exercises both of these scenarios.
Differential Revision: https://reviews.llvm.org/D113740
|
 | flang/runtime/io-stmt.cpp |
 | flang/runtime/unit.cpp |
 | flang/unittests/Runtime/ExternalIOTest.cpp |
Commit
3a1b3c9afe74ef09a16b2ceefeaad854acf3fe7d
by gkm[lld-macho][nfc] rename parsed-section types & variables
This is an NFC diff that prepares for pruning & relocating `__eh_frame`.
Along the way, I made the following changes to ... * clarify usage of `section` vs. `subsection` * remove `map` & `vec` from type names * disambiguate class `Section` from template parameter `SectionHeader`.
Differential Revision: https://reviews.llvm.org/D113241
|
 | lld/MachO/Driver.cpp |
 | lld/MachO/InputFiles.h |
 | lld/MachO/ObjC.cpp |
 | lld/MachO/SyntheticSections.cpp |
 | lld/MachO/InputFiles.cpp |
 | lld/MachO/Writer.cpp |
Commit
cdf8a53c1d33ad79be857991fbe4e7e7ced71021
by a.bataev[SLP]Fix windows build, NFC.
Need to put `IndexIdx` var to the list of captures.
|
 | llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp |
Commit
2f43a656f341ded126f3f8be6053c5e4f1bba935
by Jake.Egan[AIX] XFAIL lto-comp-dir.ll for lack of .file directive support
This test explicitly checks for .file directives, which is not currently supported on AIX. This patch sets this test to XFAIL on AIX for now.
Reviewed By: shchenz
Differential Revision: https://reviews.llvm.org/D113640
|
 | llvm/test/DebugInfo/Generic/lto-comp-dir.ll |
Commit
900cc1a226c8b8512fd3d4af90f9d7e5ecc1e722
by a.bataev[SLP]Improve cost of the gather nodes.
No need to count the final shuffle cost for the constants, gathering of the constants is just a constant vector + extra inserts, if required.
Differential Revision: https://reviews.llvm.org/D113770
|
 | llvm/test/Transforms/SLPVectorizer/X86/PR39774.ll |
 | llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp |
 | llvm/test/Transforms/SLPVectorizer/AArch64/horizontal.ll |
 | llvm/test/Transforms/SLPVectorizer/X86/reduction-logical.ll |
Commit
8fce94f91610bc4614b1fe0bff8f143ea2b54742
by spatel[InstCombine] canonicalize icmp with trunc op into mask and cmp, part 2
If C is a high-bit mask: (trunc X) u< C --> (X & C) != C (are any masked-high-bits clear?)
If C is low-bit mask: (trunc X) u> C --> (X & ~C) != 0 (are any masked-high-bits set?)
If C is not-of-power-of-2 (one clear bit): (trunc X) u> C --> (X & (C+1)) == C+1 (are all masked-high-bits set?)
This extends the fold added with: acabad9ff6bf (https://alive2.llvm.org/ce/z/aFr7qV)
Using decomposeBitTestICmp() to generalize this is a planned follow-up, but that requires removing an inverse fold.
Here are Alive2 generalizations for these folds: https://alive2.llvm.org/ce/z/u-ZpC_ (ult, the previous patch) https://alive2.llvm.org/ce/z/YsuAu2 (ult, this patch) https://alive2.llvm.org/ce/z/ekktQP (ugt, low bitmask) https://alive2.llvm.org/ce/z/pJY9wR (ugt, one clear bit)
Differential Revision: https://reviews.llvm.org/D112634
|
 | llvm/test/Transforms/InstCombine/icmp-trunc.ll |
 | llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp |
Commit
30b29db7c79ce70801800572b898b2e0df03bbb1
by jonathanchesterfield[amdgpu] Don't crash on empty global ctor/dtor
Global ctor/dtor can be an empty array, which is a Constant not a ConstantArray. The cast<ConstantArray> therefore asserts / crashes.
Reviewed By: arsenm
Differential Revision: https://reviews.llvm.org/D113800
|
 | llvm/test/CodeGen/AMDGPU/lower-empty-ctor-dtor.ll |
 | llvm/lib/Target/AMDGPU/AMDGPUCtorDtorLowering.cpp |
Commit
83727f27719d3f319f746b473ce09be7e1d99b32
by matthew.devereau[AArch64][SVE] Remove arm-registered-target requirement on bfloat tests
Changes in https://reviews.llvm.org/D113489 caused buildbot failures
|
 | clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_st1-bfloat.c |
 | clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld1-bfloat.c |
Commit
b377807a76e7ca9756d85f07907ba5e0b5b76e60
by nicolas.vasilache[mlir][LLVM] Fix folding of LLVM::ExtractValueOp
Limit the backtracking along def-use chains when a prefix is encountered as it would generate incorrect foldings.
Differential Revision: https://reviews.llvm.org/D113975
|
 | mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp |
 | mlir/test/Dialect/LLVMIR/canonicalize.mlir |
Commit
5baa4ee30b5c2d3920499d974c152525636ab8ac
by koraq[libc++][NFC] Move format_to_n_result.
Places `format_to_n_result` to its own file. While working on D112361 it turns out the type will be used outside the format header.
Reviewed By: #libc, Quuxplusone, Mordante
Differential Revision: https://reviews.llvm.org/D113831
|
 | libcxx/include/CMakeLists.txt |
 | libcxx/include/format |
 | libcxx/include/module.modulemap |
 | libcxx/test/libcxx/diagnostics/detail.headers/format/format_to_n_result.module.verify.cpp |
 | libcxx/include/__format/format_to_n_result.h |
Commit
e993c6e8f8f2f08d611e699a2a029010af9c11db
by llvmgnsyncbot[gn build] Port 5baa4ee30b5c
|
 | llvm/utils/gn/secondary/libcxx/include/BUILD.gn |
Commit
f0bb6c760c203cb760de08dba3376ba16e981d32
by koraq[libc++][doc] Add a todo.
As suggested in D113831.
|
 | libcxx/include/format |
Commit
59a98dc2080037d57efbeb55cf620d6ebf711e54
by koraq[libc++][doc] Fix copy pasted comment.
|
 | libcxx/test/libcxx/utilities/format/format.string/format.string.std/std_format_spec_integer.pass.cpp |
Commit
fa24d58279cf9a3e5a5ac894194808f4c1ad01f3
by dvyukovtsan: use smaller trace parts for Go
In the old runtime we used to use different number of trace parts for C++ and Go to reduce trace memory consumption for Go. But now it's easier and better to use smaller parts because we already use minimal possible number of parts for C++ (3).
Reviewed By: melver
Differential Revision: https://reviews.llvm.org/D113978
|
 | compiler-rt/lib/tsan/rtl/tsan_trace.h |
Commit
c971f989ee9e1356308933e809ecbbbc5976c581
by dvyukovtsan: de-hardcode number of unused bits in trace events
Precisely specifying the unused parts of the bitfield is critical for performance. If we don't specify them, compiler will generate code to load the old value and shuffle it to extract the unused bits to apply to the new value. If we specify the unused part and store 0 in there, all that unnecessary code goes away (store of the 0 const is combined with other constant parts).
I don't see a good way to ensure we cover all of u64 bits with fields. So at least introduce named kUnusedBits consts and check that bits sum up to 64.
Depends on D113978.
Reviewed By: melver
Differential Revision: https://reviews.llvm.org/D113979
|
 | compiler-rt/lib/tsan/rtl/tsan_trace.h |
Commit
0e50216f22adef2d69cc35ae0e246a42c9a7458c
by koraq[libc++][format][nfc] Remove dead code.
This was an early part of the prototype. This has never been shipped enabled and the final version of this code looks completely different.
|
 | libcxx/include/format |
Commit
274f12a44c606ecd20152f3e63c4f186793d9a8c
by kuhnel[NFC][clangd] fix llvm-namespace-comment finding
Fixing the clang-tidy finding.
Differential Revision: https://reviews.llvm.org/D113895
|
 | clang-tools-extra/clangd/xpc/XPCTransport.cpp |
Commit
4c8b8e0154f075e463428acc0640388c40d60097
by saghir[PowerPC] Allow MMA built-ins to accept non-void pointers and arrays
Calls to MMA builtins that take pointer to void do not accept other pointers/arrays whereas normal functions with the same parameter do. This patch allows MMA built-ins to accept non-void pointers and arrays.
Reviewed By: nemanjai
Differential Revision: https://reviews.llvm.org/D113306
|
 | clang/test/Sema/ppc-pair-mma-types.c |
 | clang/lib/CodeGen/CGBuiltin.cpp |
 | clang/lib/Sema/SemaChecking.cpp |
Commit
75a078455fc71cddc5e04b709b349125b610e1bb
by kuhnel[NFC] disabling clang-tidy check readability-identifier-naming in Protocol.h
The file follows the LSP syntax, so we're intentially deviating from the LLVM coding standard.
Differential Revision: https://reviews.llvm.org/D113889
|
 | clang-tools-extra/clangd/Protocol.h |
Commit
be56ece91853a094572a9ba613e1df71880ce683
by flo[llvm-reduce] Move code to check chunk to function, to enable reuse (NFC).
This patch moves the logic to clone and check a new chunk into a new function, to allow re-use in a follow-up patch that implements parallel reductions.
Reviewed By: dblaikie
Differential Revision: https://reviews.llvm.org/D113856
|
 | llvm/tools/llvm-reduce/deltas/Delta.cpp |
Commit
50acc6d0f7dd120a1de589d241423fe5bdf54add
by andrzej.warzynski[flang][fir] Add missing `HasParent` in `fir_DTEntryOp`
Differential Revision: https://reviews.llvm.org/D113674
|
 | flang/include/flang/Optimizer/Dialect/FIROps.td |
 | flang/test/Fir/convert-to-llvm-invalid.fir |
Commit
c7081b5b4cb57f27e6a075e1b5a63b7951cd8a7a
by dvyukovtsan: fix crash during thread exit
Use of gethostent provokes caching of some resources inside of libc. They are freed in __libc_thread_freeres very late in thread lifetime, after our ThreadFinish. __libc_thread_freeres calls free which previously crashed in malloc hooks. Fix it by setting ignore_interceptors for finished threads, which in turn prevents malloc hooks.
Reviewed By: melver
Differential Revision: https://reviews.llvm.org/D113989
|
 | compiler-rt/test/tsan/Linux/sethostent.cpp |
 | compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cpp |
Commit
d0c138ec8aa47ec2acb38dba247f537ca470618f
by dvyukovtsan: disable bench_threads.cpp on aarch64
The new test started failing on bots with:
CHECK failed: tsan_rtl.cpp:327 "((addr + size)) <= ((TraceMemEnd()))" (0xf06200e03010, 0xf06200000000) (tid=4073872)
https://lab.llvm.org/buildbot#builders/179/builds/1761
This is a latent bug in aarch64 virtual address space layout, there is not enough address space to fit traces for all threads. But since the trace space is going away with the new tsan runtime (D112603), disable the test.
Reviewed By: melver
Differential Revision: https://reviews.llvm.org/D113990
|
 | compiler-rt/test/tsan/bench_threads.cpp |
Commit
d4b28a0fe6857e0404d07b0989eeced05eaa45e7
by quinn.pham[NFC][clang] Inclusive language: replace master with main in convert_arm_neon.py
[NFC] As part of using inclusive language within the llvm project and to match the renamed master branch, this patch replaces master with main in `convert_arm_neon.py`.
Reviewed By: kristof.beyls
Differential Revision: https://reviews.llvm.org/D113942
|
 | clang/utils/convert_arm_neon.py |
Commit
35f798d05d5138613e1392ec1630eec93b0caff9
by mizvekov[libcxx] CI: only build native target for bootstrapping-build
Signed-off-by: Matheus Izvekov <mizvekov@gmail.com>
Reviewed By: #libc, ldionne
Differential Revision: https://reviews.llvm.org/D113950
|
 | libcxx/utils/ci/run-buildbot |
Commit
460745902275c341889bde9daeb41287359e59e3
by david.sherwood[AArch64] Fix TypeSize->uint64_t implicit conversion in AArch64ISelLowering::hasAndNot
For now I've just changed the code to only return true from AArch64ISelLowering::hasAndNot if the vector is fixed-length. Once we have the right patterns or DAG combines to use bic/bif we can also enable this for SVE.
Test added here:
CodeGen/AArch64/vselect-constants.ll
Differential Revision: https://reviews.llvm.org/D113994
|
 | llvm/test/CodeGen/AArch64/vselect-constants.ll |
 | llvm/lib/Target/AArch64/AArch64ISelLowering.h |
Commit
d17d89f4eb62c9a17c98cb069d9b5d85f83a7671
by Louis Dionne[libc++] Remove not needed call to __is_long()
The string is known to be long since __grow_by unconditionally calls __set_long_cap().
Differential Revision: https://reviews.llvm.org/D113910
|
 | libcxx/include/string |
Commit
3ddede8bfaadbd2ce9a553a979b94529fa10a9d7
by koraq[libc++][doc] Update format implementation status.
|
 | libcxx/docs/Status/FormatIssues.csv |
 | libcxx/docs/Status/FormatPaper.csv |
Commit
5beec6fb04e7dc3fb37ec0cb9acce9db635d3604
by david.spickett[libcxxabi/runtimes] Set LLVM_HOST_TRIPLE in runtimes build
This allows tests to tell if they're running natively.
Those tests are libcxxabi/test/native/arm-linux-eabi. Which were running on Linaro's bots but became unsupported when we switched to the runtimes build.
Reviewed By: #libc_abi, phosek
Differential Revision: https://reviews.llvm.org/D113663
|
 | runtimes/CMakeLists.txt |
Commit
bfc253c00068a5c5252647b6a09aef7b5f232501
by koraq[libc++][nfc] Improve standard conformance.
The return type of the deleted functions doesn't match the synopsis in the standard.
Reviewed By: #libc, ldionne
Differential Revision: https://reviews.llvm.org/D114000
|
 | libcxx/include/charconv |
Commit
4eda928660890a2aaa223fe6c2f6b7619771a9ab
by Louis Dionne[libc++] Add missed comment in https://reviews.llvm.org/D113910
|
 | libcxx/include/string |
Commit
7f287390d78d301956e8e925a84349fd4408a11e
by Louis Dionne[libc++] Add introsort to avoid O(n^2) behavior
This commit adds a benchmark that tests std::sort on an adversarial inputs, and uses introsort in std::sort to avoid O(n^2) behavior on adversarial inputs.
Inputs where partitions are unbalanced even after 2 log(n) pivots have been selected, the algorithm switches to heap sort to avoid the possibility of spending O(n^2) time on sorting the input. Benchmark results show that the intro sort implementation does significantly better.
Benchmarking results before this change. Time represents the sorting time required per element:
---------------------------------------------------------------------------------------------------------- Benchmark Time CPU Iterations ---------------------------------------------------------------------------------------------------------- BM_Sort_uint32_QuickSortAdversary_1 3.75 ns 3.74 ns 187432960 BM_Sort_uint32_QuickSortAdversary_4 3.05 ns 3.05 ns 231211008 BM_Sort_uint32_QuickSortAdversary_16 2.45 ns 2.45 ns 288096256 BM_Sort_uint32_QuickSortAdversary_64 32.8 ns 32.8 ns 21495808 BM_Sort_uint32_QuickSortAdversary_256 132 ns 132 ns 5505024 BM_Sort_uint32_QuickSortAdversary_1024 498 ns 497 ns 1572864 BM_Sort_uint32_QuickSortAdversary_16384 3846 ns 3845 ns 262144 BM_Sort_uint32_QuickSortAdversary_262144 61431 ns 61400 ns 262144 BM_Sort_uint64_QuickSortAdversary_1 3.93 ns 3.92 ns 181141504 BM_Sort_uint64_QuickSortAdversary_4 3.10 ns 3.09 ns 222560256 BM_Sort_uint64_QuickSortAdversary_16 2.50 ns 2.50 ns 283639808 BM_Sort_uint64_QuickSortAdversary_64 33.2 ns 33.2 ns 21757952 BM_Sort_uint64_QuickSortAdversary_256 132 ns 132 ns 5505024 BM_Sort_uint64_QuickSortAdversary_1024 478 ns 477 ns 1572864 BM_Sort_uint64_QuickSortAdversary_16384 3932 ns 3930 ns 262144 BM_Sort_uint64_QuickSortAdversary_262144 61646 ns 61615 ns 262144
Benchmarking results after this change:
---------------------------------------------------------------------------------------------------------- Benchmark Time CPU Iterations ---------------------------------------------------------------------------------------------------------- BM_Sort_uint32_QuickSortAdversary_1 6.31 ns 6.30 ns 107741184 BM_Sort_uint32_QuickSortAdversary_4 4.51 ns 4.50 ns 158859264 BM_Sort_uint32_QuickSortAdversary_16 3.00 ns 3.00 ns 223608832 BM_Sort_uint32_QuickSortAdversary_64 44.8 ns 44.8 ns 15990784 BM_Sort_uint32_QuickSortAdversary_256 69.0 ns 68.9 ns 9961472 BM_Sort_uint32_QuickSortAdversary_1024 118 ns 118 ns 6029312 BM_Sort_uint32_QuickSortAdversary_16384 175 ns 175 ns 4194304 BM_Sort_uint32_QuickSortAdversary_262144 210 ns 210 ns 3407872 BM_Sort_uint64_QuickSortAdversary_1 6.75 ns 6.73 ns 103809024 BM_Sort_uint64_QuickSortAdversary_4 4.53 ns 4.53 ns 160432128 BM_Sort_uint64_QuickSortAdversary_16 2.98 ns 2.97 ns 234356736 BM_Sort_uint64_QuickSortAdversary_64 44.3 ns 44.3 ns 15990784 BM_Sort_uint64_QuickSortAdversary_256 69.2 ns 69.2 ns 10223616 BM_Sort_uint64_QuickSortAdversary_1024 119 ns 119 ns 6029312 BM_Sort_uint64_QuickSortAdversary_16384 173 ns 173 ns 4194304 BM_Sort_uint64_QuickSortAdversary_262144 212 ns 212 ns 3407872
Differential Revision: https://reviews.llvm.org/D113413
|
 | libcxx/benchmarks/algorithms.bench.cpp |
 | libcxx/test/std/algorithms/alg.sorting/alg.sort/sort/sort.pass.cpp |
 | libcxx/include/__algorithm/sort.h |