- Apr 21, 2023
-
-
Diego Caballero authored
Fix wrong debug type. Reviewed By: hanchung Differential Revision: https://reviews.llvm.org/D148729
-
Mircea Trofin authored
This makes it easier to reuse the legality part for other import policies that wouldn't use thresholds. Importing un-inlinable functions is also legal, because they could be further specialized in a context-specific way, without inlining. Differential Revision: https://reviews.llvm.org/D148838
-
Nick Desaulniers authored
Alan spotted another test failure that was a result of https://reviews.llvm.org/D148546 when running expensive checks tests locally on windows. Reviewed By: ayzhao Differential Revision: https://reviews.llvm.org/D148861
-
Igor Kudrin authored
Without this dependency, it is possible that llvm-lib.exe will not be built, in which case CMake will try to use lib.exe to build libraries, but this tool cannot handle bitcode files. Differential Revision: https://reviews.llvm.org/D148751
-
Nick Desaulniers authored
My reland of https://reviews.llvm.org/D148546 has caused a few windows demangler tests to fail when run with -DLLVM_ENABLE_EXPENSIVE_CHECKS=ON on windows. I have a sneaking suspicion that MSVC's std::string_view::iterator::operator* may be missing a nullptr check. Link: https://lab.llvm.org/buildbot/#/builders/42/builds/9723/steps/7/logs/stdio Reviewed By: ayzhao Differential Revision: https://reviews.llvm.org/D148852
-
Mikhail R. Gadelha authored
This patch adds assertions to prevent the compilation when we try to bit cast a type that is not trivially copyable when using __builtin_bit_cast, or when we try to bit cast a type that is not trivially copyable and trivially constructable when using memcpy. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D148739
-
Joseph Huber authored
Summary: The `+ptx` features correspond to the related CUDA version. We require a certain set of features from the `ptxas` assembler, which is tied to the CUDA version. Some of the ones set here were insufficient, so I am simply setting a cutoff to the CUDA 9.0 release as the minimum. This roughly corresponds to what should be required for sm_60 to be compiled with the source.
-
Sp00ph authored
Previously, `vecreduce_{and,or} vNi1` could lead to miscompilations because the legalizer first decides to `any_ext` the operand (which is correct for `vecreduce_{and,or}`) and then decides to use `vecreduce_u{min,max}` instead (for which `any_ext` is incorrect). This patch changes it so the `vecreduce_u{min,max}` operations use `sign_ext` instead of `any_ext`. Issue: https://github.com/llvm/llvm-project/issues/62211 Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D148672 -
Valentin Clement authored
Values in bounds are expected to have integer or index types. Enforce this expectation by restricting the type to be IntOrIndex. Reviewed By: razvanlupusoru Differential Revision: https://reviews.llvm.org/D148839
-
Siva Chandra Reddy authored
This bug was caught by the aarch64 full build builder. Differential Revision: https://reviews.llvm.org/D148844
-
Jez Ng authored
In particular, make it `foo.a(foo.o)$ARCHIVE_OFFSET`. The goal is to make it more similar to both ld64 implementation, which uses the `foo.a(foo.o)$MODULE_ID` format. We dump some of these names in LTO code, so matching ld64's format is helpful. This format is also more similar to LLD-ELF's, which is `foo.a(foo.o at $ARCHIVE_OFFSET)`. Reviewed By: #lld-macho, oontvoo Differential Revision: https://reviews.llvm.org/D148828
-
Peiming Liu authored
Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D148842
-
Craig Topper authored
If the AVL is a virtual register defined by a vsetvli with the same vlmax we need and the previous vsetvli we saw in the data flow also has that vlmax, we can use the x0, x0 form when we insert a vsetvli. Not only does this avoid an update of the VL physical register, but it may allow doLocalPostpass to completely remove the inserted vsetvli by rewriting the vtype of the previous vsetvli. Differential Revision: https://reviews.llvm.org/D148735
-
Craig Topper authored
-
Peter Klausler authored
Allow two currently erroneous cases of !DIR$ IGNORE_TKR errors: allocatable and pointers, and IGNORE_TKR(R) on (other) arguments passed via descriptors. Downgrade these cases to warnings when they appear in external interfaces, since their implementations may well be in C. But retain the error status on these cases for module procedures, since the Fortran implementation probably can't work. Differential Revision: https://reviews.llvm.org/D148833
-
Rahul Kayaith authored
Currently conversions to interfaces may happen implicitly (e.g. `Attribute -> TypedAttr`), failing a runtime assert if the interface isn't actually implemented. This change marks the `Interface(ValueT)` constructor as explicit so that a cast is required. Where it was straightforward to I adjusted code to not require casts, otherwise I just made them explicit. Depends on D148491, D148492 Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D148493
-
Rahul Kayaith authored
This allows implicit conversion from `ElementsAttr` to `TypedAttr`, but required renaming the `ElementsAttr::getType()` interface method to `getShapedType`. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D148492
-
Rahul Kayaith authored
This adds `arith::ConstantOp::materialize`, which builds a constant from an attribute and type only if it would result in a valid op. This is useful for dialect `materializeConstant` hooks, and allows for removing the previous `Attribute, Type` builder which was only used during materialization. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D148491
-
Alexey Bataev authored
instruction, NFC.
-
Peiming Liu authored
Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D148818
-
Aaron Ballman authored
This is the first instance where we've really needed to add documentation for a diagnostic group, but -Wwrite-strings really deserves it. This warning option changes the semantic behavior of code, so enabling it can cause code to break (and disabling it can too). That's worth calling out loudly in our documentation.
-
Siva Chandra Reddy authored
After the switch to `add_custom_target` to run integration tests, most of them were not actually being run because of the difference in the way the COMMAND value is treated between `add_custom_target` and `add_custom_command`. This patch gets the integration tests to run again by passing the correct set of arguments to `add_custom_target`. Reviewed By: michaelrj Differential Revision: https://reviews.llvm.org/D148786
-
Michael Jones authored
Uint addition and subtraction normally use builtins which aren't constexpr. This patch adds an rvalue overload version of the addition and subtraction operation that is always constexpr. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D148759
-
Doru Bercea authored
Review: https://reviews.llvm.org/D148832
-
Noah Goldstein authored
Includes macros: linux/SCHED_OTHER // posix req linux/SCHED_FIFO // posix req linux/SCHED_RR // posix req linux/SCHED_BATCH linux/SCHED_ISO linux/SCHED_IDLE linux/SCHED_DEADLINE Includes types: struct sched_param { int sched_priority; } Includes functions: sched_setparam sched_getparam sched_setscheduler sched_getscheduler sched_get_priority_max sched_get_priority_min sched_rr_get_interval Reviewed By: michaelrj Differential Revision: https://reviews.llvm.org/D148069 -
Noah Goldstein authored
Previously unconditionally stored to the return value. This is incorrect, we should only return if user value is non-null. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D148293
-
Ramiro Leal-Cavazos authored
This commit adds a pattern that expands `math.roundeven` into `math.round` + some ops from `arith`. This is needed to be able to run `math.roundeven` in a vectorized manner. Reviewed By: jpienaar Differential Revision: https://reviews.llvm.org/D148285
-
Sam McCall authored
-
LLVM GN Syncbot authored
-
Roy Sundahl authored
This test is heavy on test resources and involves moving a large 2GB+ file across an ssh connection when testing on remote devices. Exclude all tests except for macOS testing (on host). Remote device testing for macOS may eventually cause a problem on macOS as well w/o better handling of tests that require more resource/time than we currently handle. Introduced by: https://reviews.llvm.org/D146189 Subsequent exclusion of all but darwin by: https://reviews.llvm.org/D147094 Subsequent exclusion of tvOS and watchOS by: https://reviews.llvm.org/D147502 Subsequent exclusion of all but macOS... rdar://107570309 Reviewed By: yln, thetruestblue Differential Revision: https://reviews.llvm.org/D148727 -
Mark de Wever authored
As obvious from the paper's title this is an LWG issue and thus retroactively applied to C++20. This change may the output for certain code points: 1 Considers 8477 extra codepoints as having a width 2 (as of Unicode 15) (mostly Tangut Ideographs) 2 Change the width of 85 unassigned code points from 2 to 1 3 Change the width of 8 codepoints (in the range U+3248 CIRCLED NUMBER TEN ON BLACK SQUARE ... U+324F CIRCLED NUMBER EIGHTY ON BLACK SQUARE) from 2 to 1, because it seems questionable to make an exception for those without input from Unicode Note that libc++ already uses Unicode 15, while the Standard requires Unicode 12. (The last time I checked MSVC STL used Unicode 14.) So in practice the only notable change is item 3. Implements P2675 LWG3780: The Paper format's width estimation is too approximate and not forward compatible Benchmark before these changes -------------------------------------------------------------------- Benchmark Time CPU Iterations -------------------------------------------------------------------- BM_ascii_text<char> 3928 ns 3928 ns 178131 BM_unicode_text<char> 75231 ns 75230 ns 9158 BM_cyrillic_text<char> 59837 ns 59834 ns 11529 BM_japanese_text<char> 39842 ns 39832 ns 17501 BM_emoji_text<char> 3931 ns 3930 ns 177750 BM_ascii_text<wchar_t> 4024 ns 4024 ns 174190 BM_unicode_text<wchar_t> 63756 ns 63751 ns 11136 BM_cyrillic_text<wchar_t> 44639 ns 44638 ns 15597 BM_japanese_text<wchar_t> 34425 ns 34424 ns 20283 BM_emoji_text<wchar_t> 3937 ns 3937 ns 177684 Benchmark after these changes -------------------------------------------------------------------- Benchmark Time CPU Iterations -------------------------------------------------------------------- BM_ascii_text<char> 3914 ns 3913 ns 178814 BM_unicode_text<char> 70380 ns 70378 ns 9694 BM_cyrillic_text<char> 51889 ns 51877 ns 13488 BM_japanese_text<char> 41707 ns 41705 ns 16723 BM_emoji_text<char> 3908 ns 3907 ns 177912 BM_ascii_text<wchar_t> 3949 ns 3948 ns 177525 BM_unicode_text<wchar_t> 64591 ns 64587 ns 10649 BM_cyrillic_text<wchar_t> 44089 ns 44078 ns 15721 BM_japanese_text<wchar_t> 39369 ns 39367 ns 17779 BM_emoji_text<wchar_t> 3936 ns 3934 ns 177821 Benchmarks without "if(__code_point < (__entries[0] >> 14))" -------------------------------------------------------------------- Benchmark Time CPU Iterations -------------------------------------------------------------------- BM_ascii_text<char> 3922 ns 3922 ns 178587 BM_unicode_text<char> 94474 ns 94474 ns 7351 BM_cyrillic_text<char> 69202 ns 69200 ns 10157 BM_japanese_text<char> 42735 ns 42692 ns 16382 BM_emoji_text<char> 3920 ns 3919 ns 178704 BM_ascii_text<wchar_t> 3951 ns 3950 ns 177224 BM_unicode_text<wchar_t> 81003 ns 80988 ns 8668 BM_cyrillic_text<wchar_t> 57020 ns 57018 ns 12048 BM_japanese_text<wchar_t> 39695 ns 39687 ns 17582 BM_emoji_text<wchar_t> 3977 ns 3976 ns 176479 This optimization does carry its weight for the Unicode and Cyrillic test. For the Japanese tests the gains are minor and for emoji it seems to have no effect. Reviewed By: ldionne, tahonermann, #libc Differential Revision: https://reviews.llvm.org/D144499
-
Fangrui Song authored
When --threads= is unspecified, we set it to `parallel::strategy.compute_thread_count()`, which uses sched_getaffinity (Linux)/cpuset_getaffinity (FreeBSD)/std::thread::hardware_concurrency (others). With extensive testing on many machines (many configurations from {aarch64,x86-64} x {Linux,FreeBSD,Windows} x allocators(native,mimalloc,rpmalloc) combinations) with varying workloads, we discovered that when the concurrency is larger than 16, the linking process is slower than using --threads=16 due to parallelism overhead outweighs optimizations. This is particularly harmful for machines with many cores or when the link job competes with other jobs. Cap parallel::strategy when --threads= is unspecified. For some workloads changing the concurrency from 8 to 16 has nearly no improvement. --thinlto-jobs= is unchanged since ThinLTO backend compiles are embarrassingly parallel. Link: https://discourse.llvm.org/t/avoidable-overhead-from-threading-by-default/69160 Reviewed By: peter.smith, andrewng Differential Revision: https://reviews.llvm.org/D147493 -
Mark de Wever authored
Reviewed By: ldionne, #libc Differential Revision: https://reviews.llvm.org/D148459
-
Teresa Johnson authored
As pointed out in https://discourse.llvm.org/t/undeterministic-thin-index-file/69985, the block count added to distributed ThinLTO index files breaks incremental builds on ThinLTO - if any linked file has a different number of BBs, then the accumulated sum placed in the index files will change, causing all ThinLTO backend compiles to be redone. The block count is only used for scaling of partial sample profiles, and was added in D80403 for D79831. This patch simply removes this field from the index files of non partial sample profile compiles, which is NFC on the output of the compiler. We subsequently need to see if this can be removed for partial sample profiles without signficant performance loss, or redesigned in a way that does not destroy caching. Differential Revision: https://reviews.llvm.org/D148746
-
Alexander Yermolovich authored
Fixed issue where {tu,cu}-index fixup code for DWARF5 that would report an error when fixup map is empty. Which is the case when seciton(s) are not over 4GB or --manaully-generate-unit-index is not specified Differential Revision: https://reviews.llvm.org/D148578 -
Nathan Sidwell authored
Defaults to ON for x86_64 && (Linux | Darwin). If enabled, checks that /proc/self/map_files is readable. Some systems are configured so that getdents fails with EPERM. Reviewed By: rafauler Differential Revision: https://reviews.llvm.org/D148742
-
Doru Bercea authored
Review: https://reviews.llvm.org/D147572
-
Simon Pilgrim authored
We were treating vXi8 multiply as the sum of a trunc(mul(extend(),extend())) which diverged from the costs from llvm-mcaonce we extended beyond legal types Use a modified version of the D103695 script to determine more accurate throughput/latency/codesize/size-latency cost estimates Helps address some of the regressions identified in D148806
-
Dimitry Andric authored
In https://reviews.llvm.org/D141285 the optional definitions of `HWCAP` macros were moved to before their usage. However, they were also moved to before the inclusion of system headers which can optionally define them. If any of those system headers then actually defined any of the `HWCAP` macros, it would result in a redefinition error. Move the system header includes to just before the optional definitions, to avoid this problem. Reviewed By: ilinpv Differential Revision: https://reviews.llvm.org/D148819
-
Ben Langmuir authored
We only want to make PCH imports visible once for the the TU, not repeatedly after every subsequent import. This causes some incorrect behaviour with submodule visibility, and causes us to get extra module dependencies in the scanner. So far I have only seen obviously incorrect behaviour when building with -fmodule-name to cause a submodule to be textually included when using the PCH, though the old behaviour seems wrong regardless. rdar://107449644 Differential Revision: https://reviews.llvm.org/D148176
-