- Aug 12, 2022
-
-
Martin Storsjö authored
This adds support for the existing GNU ld command line option, which allows excluding individual symbols from autoexport (when linking a DLL and no symbols are marked explicitly as dllexported). Differential Revision: https://reviews.llvm.org/D130118 (cherry picked from commit d1da6469)
-
Martin Storsjö authored
Since bb939931, the c++experimental library is always built, so these tested files should always be built (even if they aren't used in tests). Differential Revision: https://reviews.llvm.org/D129399 (cherry picked from commit b8717d19)
-
Louis Dionne authored
(cherry picked from commit b1009bbd)
-
Louis Dionne authored
This will allow using it in functions that are [[noreturn]] themselves. Differential Revision: https://reviews.llvm.org/D131408 (cherry picked from commit f5738c51)
-
Mark de Wever authored
D131234 marked the ranges papers as complete, but it didn't set the feature-test macro. Reviewed By: ldionne, var-const, #libc Differential Revision: https://reviews.llvm.org/D131326 (cherry picked from commit 195287d9)
-
Louis Dionne authored
(cherry picked from commit 27442728)
-
Louis Dionne authored
It used to be defined by the compiler, but libc++ now provides it. Differential Revision: https://reviews.llvm.org/D131201 (cherry picked from commit 0a5c344a)
-
Aaron Ballman authored
As was observed in https://reviews.llvm.org/D123627#3707635, it's confusing that a user can write: ``` float rintf(void) {} ``` and get a warning, but writing: ``` float rintf() {} ``` gives an error. This patch changes the behavior so that both are warnings, so that users who have functions which conflict with a builtin identifier can still use that identifier as they wish. Differential Revision: https://reviews.llvm.org/D131499 (cherry picked from commit 4c02ab8c)
-
Dinar Temirbulatov authored
After D121595 was commited, I noticed regressions assosicated with small trip count numbersvectorisation by tail folding with scalable vectors. As a solution for those issues I propose to introduce the minimal trip count threshold value. Differential Revision: https://reviews.llvm.org/D130755 (cherry picked from commit cab6cd68)
-
Martin Storsjö authored
When clang includes a PCH, it tolerates some amount of differences between the defines used when creating and when including the PCH - this seems to be intentionally allowed in c379c072 (and later extended in b6368751). When using a PCH (or when picking a PCH out of a directory containing multiple candidates) Clang used to accept the header if there were defines on the command line when creating the PCH that are missing when using the PCH, or vice versa, defines only set when using the PCH. The only cases where Clang explicitly rejected the use of a PCH is if there was an explicit conflict between the options, e.g. -DFOO=1 vs -DFOO=2, or -DFOO vs -UFOO. The latter commit added a FIXME that we really should check whether mismatched defines actually were used somewhere in the PCH, so that the define would affect the outcome. This FIXME has stood unaddressed since 2012. This differs from GCC, which rejects PCH files if the defines differ at all. When explicitly including a single PCH file, the relaxed policy of allowing minor differences is harmless for correct use cases (but may fail to diagnose mismtaches), and potentially allow using PCHs in wider cases (where the user intentionally know that the differences in defines are harmless for the PCH). However, for GCC style PCH directories, with a directory containing multiple PCH variants and the compiler should pick the correct match out of them, Clang's relaxed logic was problematic. The directory could contain two otherwise identical PCHs, but one built with -DFOO and one without. When attempting to include a PCH and iterating over the candidates in the directory, Clang would essentially pick the first one out of the two, even if there existed a better, exact match in the directory. Keep the relaxed checking when specificlly including one named PCH file, but require strict matches when trying to pick the right candidate out of a GCC style directory with alternatives. This fixes https://github.com/lhmouse/mcfgthread/issues/63. Differential Revision: https://reviews.llvm.org/D126676 (cherry picked from commit c843c921)
-
Nikita Popov authored
The RelLookupTableConverter pass currently only supports 64-bit pointers. This is currently enforced using an isArch64Bit() check on the target triple. However, we consider x32 to be a 64-bit target, even though the pointers are 32-bit. (And independently of that specific example, there may be address spaces with different pointer sizes.) As such, add an additional guard for the size of the pointers that are actually part of the lookup table. Differential Revision: https://reviews.llvm.org/D131399 (cherry picked from commit 4ac00789)
-
Johannes Doerfert authored
If we collect potential values we need to visit a value even if we have seen it before if the scope is different. The scope is part of the result after all. Test included. Fixes https://github.com/llvm/llvm-project/issues/56753 Differential Revision: https://reviews.llvm.org/D131597 (cherry picked from commit b65471d7)
-
- Aug 11, 2022
-
-
Joseph Huber authored
We recently added support for multi-architecture binaries in libomptarget. This is done by extracting the architecture from the embedded image and comparing it with the major and minor version supported by the current CUDA installation. Previously we just compared these directly, which was not correct for binary compatibility. The CUDA documentation states that we can consider any image with an equivalent major or a greater or equal to minor compatible with the current image. Change the check to use this new logic in the CUDA plugin. Fixes #57049 Reviewed By: jdoerfert, ye-luo Differential Revision: https://reviews.llvm.org/D131567 (cherry picked from commit fdbb1535)
-
YingChi Long authored
Fixes https://github.com/llvm/llvm-project/issues/57013 https://reviews.llvm.org/D115031 improved printing of non-type template parameter args. But checking if the end of Inits is 0 without checking if APValue is an integer, causes clang to segfault. This patch adds the code to check the type. (May not be a proper bugfix.) Reviewed By: aaron.ballman, lichray Differential Revision: https://reviews.llvm.org/D131466 (cherry picked from commit 55d3b79d)
-
Philip Reames authored
This fixes a bug reported privately by @craig.topper. Here's an example which illustrates the problem: vsetivli a1, a0, e32, m1, ta, mu # both DefInfo and PrevInfo vsetivli a2, a1, e32, m4, ta, mu With the unsound result being: vsetivli a1, a0, e32, m1, ta, mu vsetivli a2, a0, e32, m4, ta, mu Consider the case where this is running on a machine with VLEN=512,. For this case, the VLMAXs are 16 and 64 respectively. Consider for a0 = 33. The correct result is: a1 = 16, and a2 = 16 After the unsound optimization: a1 = 16 and a2 = 33 This particular example used VLMAXs which differed by more than a power of two. With a difference of only one power of two, there's another form of this bug which involves the AVL < 2 x VLMAX special case, but that ones more complicated to construct as many examples turn out accidentally sound. This patch takes the approach of simply removing the unsound optimization, but there are multiple sound sub-cases of it. I plan to return to at least a couple of them, but figured it was cleaner to remove the unsound optimization (for ease of backporting), and then review the new optimizations on their own. Differential Revision: https://reviews.llvm.org/D131264 (cherry picked from commit 9a9848f4)
-
Kadir Cetinkaya authored
This reverts commit 4e94f665. See https://reviews.llvm.org/D129973#3698969 for reasoning. (cherry picked from commit df48e3fb)
-
Fangrui Song authored
BSD and GNU ranlib support more than one input file. Implement this. While here, update OVERVIEW (Ranlib => ranlib) since "ranlib" is more common. Remove "speed access" since the index has nothing to do with performance: it is mandatory for GNU ld and gold but ignored for ld.lld (D119074). Close https://github.com/llvm/llvm-project/issues/54565 Differential Revision: https://reviews.llvm.org/D131375 (cherry picked from commit aa173573)
-
Fangrui Song authored
(cherry picked from commit 350f17ab)
-
Mark de Wever authored
This paper was accepted during the last plenary and is intended to be backported to LLVM 15. When backporting the release notes in the branch should be updated too. Note the feature-test macro isn't updated since this will change; three papers have updated the same macro in the same plenary. Implements: - P2508R1 Exposing std::basic-format-string Reviewed By: ldionne, #libc Differential Revision: https://reviews.llvm.org/D130643 (cherry picked from commit f712775d)
-
- Aug 10, 2022
-
-
Michael Kruse authored
The suffix is only added then the path the (lld-)link.exe is fully resolved. Otherwise it may stay "link" or "lld-link". On non-Windows platforms, lld-link also exists as a symbolic link to lld, such that the full the path to lld-link might also be resolved without .exe suffix in this case. Note that CLANG_DEFAULT_LINKER could be set to other linkers such as mold, in which case the test may still fail. This also applies to the non-Windows tests that require "ld" in the linker name. Fixes issue #56955 (cherry picked from commit 8c0979c8)
-
Kadir Cetinkaya authored
-
David Green authored
D129150 added a combine from shuffles to And that creates a BUILD_VECTOR of constant elements. We need to ensure that the elements are of a legal type, to prevent asserts during lowering. Fixes #56970. Differential Revision: https://reviews.llvm.org/D131350 (cherry picked from commit 061e0189)
-
David Green authored
(cherry picked from commit f8d97617)
-
Diana Picus authored
When linking scudo standalone on armv7, it can't find symbols related to unwinding (e.g. __aeabi_unwind_cpp_pr0). This is because it is passing --unwindlib=none. This patch hacks around the issue by adding COMPILER_RT_UNWINDER_LINK_LIBS to the link line. I don't know anything about scudo, so I'm not sure what the original intention was. See also https://github.com/llvm/llvm-project/issues/56900 Differential Revision: https://reviews.llvm.org/D131250 (cherry picked from commit 8342ea6e)
-
Tom Stellard authored
As discussed on RFC mapping into SPIR-V requires pointer being preserved in some cases: https://discourse.llvm.org/t/rfc-better-support-for-typed-pointers-in-an-opaque-pointer-world/63339/23?u=anastasiastulova As the work is still unfinished the best approach is to continue using pointer types. Note that this change is only planned to be committed in release 15 branch. This fixing PR56660. Reviewed By: jcranmer-intel Differential Revision: https://reviews.llvm.org/D130766
-
Alex Brachet authored
This was recently introduced in GNU linkers and it makes sense for ld.lld to have the same support. This implementation omits checking if the input string is valid json to reduce size bloat. Differential Revision: https://reviews.llvm.org/D131439 (cherry picked from commit dbd04b85)
-
- Aug 09, 2022
-
-
Martin Storsjö authored
CMAKE_DL_LIBS is documented as "Name of library containing dlopen and dlclose". On Windows platforms, there's no system provided dlopen/dlclose, but it can be argued that if you really intend to call dlopen/dlclose, you're going to be using a third party compat library like https://github.com/dlfcn-win32/dlfcn-win32, and CMAKE_DL_LIBS should expand to its name. This has been argued upstream in CMake in https://gitlab.kitware.com/cmake/cmake/-/issues/17600 and https://gitlab.kitware.com/cmake/cmake/-/merge_requests/1642, that CMAKE_DL_LIBS should expand to "dl" on mingw platforms. The merge request wasn't merged though, as it caused some amount of breakage, but in practice, Fedora still carries a custom CMake patch with the same effect. Thus, this patch fixes cross compiling OpenMP for mingw targets on Fedora with their custom-patched CMake. Differential Revision: https://reviews.llvm.org/D130892 (cherry picked from commit 7f24fd26)
-
Jonathan Peyton authored
omp50_taskdep_depobj.c relies on the test compiler's omp.h file. If the test compiler does not have an omp.h file, then use the one within the build tree. Fixes: https://github.com/llvm/llvm-project/issues/56820 Differential Revision: https://reviews.llvm.org/D131000 (cherry picked from commit 9cf6511b)
-
David Sherwood authored
Eliminate an AND by redefining an anyext|sext|zext. (and (extract_subvector (anyext|sext|zext v) _) iN_mask) => (extract_subvector (zeroext_iN v)) Differential Revision: https://reviews.llvm.org/D130782 (cherry picked from commit 41119a0f) -
David Sherwood authored
A build vector of two extracted elements is equivalent to an extract subvector where the inner vector is any-extended to the extract_vector_elt VT, because extract_vector_elt has the effect of an any-extend. (build_vector (extract_elt_i16_to_i32 vec Idx+0) (extract_elt_i16_to_i32 vec Idx+1)) => (extract_subvector (anyext_i16_to_i32 vec) Idx) Depends on D130697 Differential Revision: https://reviews.llvm.org/D130698 (cherry picked from commit 487fa6f8)
-
David Sherwood authored
Add tests which show code quality of uitofp and sitofp. Differential Revision: https://reviews.llvm.org/D130697 (cherry picked from commit 6953e754)
-
Martin Storsjö authored
This fixes warnings like these: ../runtime/src/kmp_dispatch.cpp:2159:24: warning: left operand of comma operator has no effect [-Wunused-value] OMPT_LOOP_DISPATCH(*p_lb, *p_ub, pr->u.p.st, status); ^~~~~ ../runtime/src/kmp_dispatch.cpp:2159:31: warning: left operand of comma operator has no effect [-Wunused-value] OMPT_LOOP_DISPATCH(*p_lb, *p_ub, pr->u.p.st, status); ^~~~~ ../runtime/src/kmp_dispatch.cpp:2159:46: warning: left operand of comma operator has no effect [-Wunused-value] OMPT_LOOP_DISPATCH(*p_lb, *p_ub, pr->u.p.st, status); ~~~~~~~ ^~ ../runtime/src/kmp_dispatch.cpp:2159:50: warning: expression result unused [-Wunused-value] OMPT_LOOP_DISPATCH(*p_lb, *p_ub, pr->u.p.st, status); ^~~~~~ (cherry picked from commit 3f25ad33) -
Dmitry Vassiliev authored
This patch fixes the error llvm/lib/CodeGen/MachineScheduler.cpp(755): error C2065: 'MISchedCutoff': undeclared identifier in case of NDEBUG and LLVM_ENABLE_ABI_BREAKING_CHECKS. Note MISchedCutoff is declared under #ifndef NDEBUG. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D130425 (cherry picked from commit adc38746)
-
Stefan Gränitz authored
Macros that expand into multiple terms can cause interesting preprocessor hickups depending on the context they are used in. https://github.com/llvm/llvm-project/issues/56867 reported a miscompilation of `llvm_unreachable(msg)` inside a `LLVM_DEBUG({ ... })` block. We were able to fix it by wrapping the expansion in a `do {} while(false)`. Differential Revision: https://reviews.llvm.org/D131337 (cherry picked from commit 7a66fe10)
-
Jez Ng authored
Previously we only supporting using the system pointer size (aka the `absptr` encoding) because `llvm-mc`'s CFI directives always generate EH frames with that encoding. But libffi uses 4-byte-encoded, hand-rolled EH frames, so this patch adds support for it. Fixes #56576. Reviewed By: #lld-macho, oontvoo Differential Revision: https://reviews.llvm.org/D130804 (cherry picked from commit 6c9f6812)
-
Louis Dionne authored
When back-deploying to older platforms, we can still provide assertions, but we might not be able to provide a great implementation for the verbose handler. Instead, we can just call ::abort(). Differential Revision: https://reviews.llvm.org/D131199 (cherry picked from commit e36f9e13)
-
Konstantin Varlamov authored
The newly-completed papers: - P0896R4 ("The One Ranges Proposal"); - P1243R4 ("Rangify New Algorithms"); - P1252R2 ("Ranges Design Cleanup"); - P1716R3 ("Range Comparison Algorithms Are Over-Constrained"); - P1871R1 ("Concept traits should be named after concepts"); - P2106R0 ("Alternative wording for GB315 and GB316"). Differential Revision: https://reviews.llvm.org/D131234 (cherry picked from commit 3fa291fa) -
Konstantin Varlamov authored
Also fix `std::find_first_of` (which accidentally copied the predicate in the implementation). Differential Revision: https://reviews.llvm.org/D131235 (cherry picked from commit 8ac015ca)
-
Louis Dionne authored
This partially reverts commit 7d855bb8. The comments were actually not outdated, they were simply unclear. (cherry picked from commit cf08452e)
-
Louis Dionne authored
(cherry picked from commit 7d855bb8)
-