- Sep 26, 2022
-
-
Krzysztof Parzyszek authored
This avoids deprecation warning: ``` warning: definition of implicit copy assignment operator for 'AddrInfo' is deprecated because it has a user-declared copy constructor [-Wdeprecated-copy] ``` This fixes https://github.com/llvm/llvm-project/issues/57229 (cherry picked from commit 252cea03)
-
Chen Zheng authored
This solves https://github.com/llvm/llvm-project/issues/57664 Reviewed By: sameerds Differential Revision: https://reviews.llvm.org/D134019 (cherry picked from commit c941d925)
-
- Sep 24, 2022
-
-
Louis Dionne authored
In LLVM 15, we added the deprecation markup for unary_function and binary_function for >= C++11, and we also removed it for >= C++17. While this is in accordance with the Standard, it's also a bit quick for our users, since there was no release in which the classes were marked as deprecated before their removal. We noticed widespread breakage due to this, and after months of trying to fix downstream failures, I am coming to the conclusion that users will be better served if we give them one release where unary_function is deprecated but still provided even in >= C++17. Differential Revision: https://reviews.llvm.org/D134473
-
- Sep 22, 2022
-
-
James Y Knight authored
(cherry picked from commit 59351fe3)
-
- Sep 20, 2022
-
-
Florian Hahn authored
Epilogue vectorization uses isScalarAfterVectorization to check if widened versions for inductions need to be generated and bails out in those cases. At the moment, there are scenarios where isScalarAfterVectorization returns true but VPWidenPointerInduction::onlyScalarsGenerated would return false, causing widening. This can lead to widened phis with incorrect start values being created in the epilogue vector body. This patch addresses the issue by storing the cost-model decision in VPWidenPointerInductionRecipe and restoring the behavior before 151c1443. This effectively reverts 151c1443, but the long-term fix is to properly support widened inductions during epilogue vectorization Fixes #57712.
-
Florian Hahn authored
The test requires the AArch64 backend, so move it to the right subdir.
-
Florian Hahn authored
Includes a test for the miscompile in #57712.
-
Louis Dionne authored
In https://llvm.org/D56913, we added an emulation for the __atomic_always_lock_free compiler builtin when compiling in Freestanding mode. However, the emulation did (and could not) give exactly the same answer as the compiler builtin, which led to a potential ABI break for e.g. enum classes. After speaking to the original author of D56913, we agree that the correct behavior is to instead always use the compiler builtin, since that provides a more accurate answer, and __atomic_always_lock_free is a purely front-end builtin which doesn't require any runtime support. Furthermore, it is available regardless of the Standard mode (see https://godbolt.org/z/cazf3ssYY). However, this patch does constitute an ABI break. As shown by https://godbolt.org/z/1eoex6zdK: - In LLVM <= 11.0.1, an atomic<enum class with 1 byte> would not contain a lock byte. - In LLVM >= 12.0.0, an atomic<enum class with 1 byte> would contain a lock byte. This patch breaks the ABI again to bring it back to 1 byte, which seems like the correct thing to do. Fixes #57440 Differential Revision: https://reviews.llvm.org/D133377 (cherry picked from commit f1a601fe)
-
Tobias Hieta authored
If libcxxabi is not included CMake will error out: Cannot find target libcxxabi-SHARED I ran into this doing the 15.0.0 release Differential Revision: https://reviews.llvm.org/D133475
-
Tobias Hieta authored
-
- Sep 19, 2022
-
-
Nikita Popov authored
Callee save registers must be preserved, so -fzero-call-used-regs should not be zeroing them. The previous implementation only did not zero callee save registers that were saved&restored inside the function, but we need preserve all of them. Fixes https://github.com/llvm/llvm-project/issues/57692. Differential Revision: https://reviews.llvm.org/D133946 (cherry picked from commit b4309800)
-
Brad Smith authored
(cherry picked from commit 3eca0b39)
-
Kadir Cetinkaya authored
This handles the new CLDXC options that was introduced in https://reviews.llvm.org/D128462 inside clang-tooling to make sure cl driver mode is not broken. Fixes https://github.com/clangd/clangd/issues/1292. Differential Revision: https://reviews.llvm.org/D133962 (cherry picked from commit 23ace26e)
-
Joseph Huber authored
These patches exposed a lot of problems in the AMD toolchain. Rather than keep it broken we should revert it to its old semi-functional state. This will prevent us from using device destructors but should remove some new bugs. In the future this interface should be changed once these problems are addressed more correctly. This reverts commit ed0f2181. This reverts commit 2b7203a3. Fixes #57536 Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D133997
-
- Sep 15, 2022
-
-
Fangrui Song authored
When .gnu.version_r is empty (allowed by readelf but warned by objdump), llvm-objdump -p may decode the next section as .gnu.version_r and may crash due to out-of-bounds C string reference. ELFFile<ELFT>::getVersionDependencies handles 0-entry .gnu.version_r gracefully. Just use it. Fix https://github.com/llvm/llvm-project/issues/57707 Differential Revision: https://reviews.llvm.org/D133751 (cherry picked from commit 25394c9d)
-
Fangrui Song authored
(cherry picked from commit 55a72dae)
-
Rainer Orth authored
As described in Issue #54196 <https://github.com/llvm/llvm-project/issues/54196>, the ideas of `clang` and `compiler-rt` where runtime libs are located with `-DLLVM_ENABLE_RUNTIMES` can differ. This is the `compiler-rt` side of the patch I've used to get them in sync for the `amd64-pc-solaris2.11` and `sparc64-unknown-linux-gnu` release builds. Tested on `amd64-pc-solaris2.11` and `sparc64-unknown-linux-gnu`. Differential Revision: https://reviews.llvm.org/D133406 (cherry picked from commit cadc9cde)
-
Tobias Hieta authored
-
Tobias Hieta authored
-
Aaron Ballman authored
The changes in Clang 15.0.0 which enabled these diagnostics as a warning which defaulted to an error caused disruption for people working on distributions such as Gentoo. There was an explicit request to downgrade these to be warning-only in Clang 15.0.1 with the expectation that Clang 16 will default the diagnostics to an error. See https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror-implicit-function-declaration/65213 for more details on the discussion. See https://reviews.llvm.org/D133800 for the public review of these changes.
-
- Sep 14, 2022
-
-
Shoaib Meenai authored
Folding them will cause the unwinder to compute the incorrect function start address for the folded entries, which in turn will cause the personality function to interpret the LSDA incorrectly and break exception handling. You can verify the end-to-end flow by creating a simple C++ file: ``` void h(); int main() { h(); } ``` and then linking this file against the liblsda.dylib produced by the test case added here. Before this change, running the resulting program would result in a program termination with an uncaught exception. Afterwards, it works correctly. Reviewed By: #lld-macho, thevinster Differential Revision: https://reviews.llvm.org/D132845 (cherry picked from commit 56bd3185) -
Shoaib Meenai authored
This section is marked S_ATTR_LIVE_SUPPORT in input files, which meant that on arm64, we were unnecessarily preserving FDEs if we e.g. had multiple weak definitions for a function. Worse, we would actually produce an invalid `__eh_frame` section in that case, because the CIE associated with the unnecessary FDE would still get dead-stripped and we'd end up with a dangling FDE. We set up associations from functions to their FDEs, so dead-stripping will just work naturally, and we can clear S_ATTR_LIVE_SUPPORT from our input `__eh_frame` sections to fix dead-stripping. Reviewed By: #lld-macho, int3 Differential Revision: https://reviews.llvm.org/D132489 (cherry picked from commit a745e479)
-
Mark de Wever authored
During the discussion on the SG-10 mailinglist regarding the format feature-test macros voted in during the last plenary it turns out libc++ can't mark the format feature-test macro as implemented. According to https://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations#__cpp_lib_format the not yet implemented paper P1361R2 Integration of chrono with text formatting affects the feature test macro. Note that P1361R2 doesn't mention the feature-test macro nor is there an LWG-issue to address the issue. The reporter of the issue didn't recall where this requirement exactly has been decided. Reviewed By: ldionne, #libc Differential Revision: https://reviews.llvm.org/D133271
-
- Sep 12, 2022
-
-
Jan Ole Hüser authored
Bug: An assertion fails: Assertion failed: isa<To>(Val) && "cast<Ty>() argument of incompatible type!", file C:\Users\<user>\prog\llvm\llvm-git-lld-bug\llvm\include\llvm/Support/Casting.h, line 578 Bug is triggered, if - a map file is requested with /MAP, and - Architecture is ARMv7, Thumb, and - a relative jump (branch instruction) is greater than 16 MiB (2^24) The reason for the Bug is: - a Thunk is created for the jump - a Symbol for the Thunk is created - of type `DefinedSynthetic` - in file `Writer.cpp` - in function `getThunk` - the Symbol has no name - when creating the map file, the name of the Symbol is queried - the function `Symbol::computeName` of the base class `Symbol` casts the `this` pointer to type `DefinedCOFF` (a derived type), but the acutal type is `DefinedSynthetic` - The in the llvm::cast an assertion fails Changes: - Modify regression test to trigger this bug - Give the symbol pointing to the thunk a name, to fix the bug - Add assertion, that only DefinedCOFF symbols are allowed to have an empty name, when the constructor of the base class Symbol is executed Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D133201 (cherry picked from commit 4e5a59a3) -
Brad Smith authored
CRunnerUtils builds as C++11. 9c1d133c broke the build on OpenBSD. aligned_alloc() was only introduced in C++17.
-
Nikita Popov authored
DwarfEhPrepare inserts calls to _Unwind_Resume into landing pads. If _Unwind_Resume happens to be defined in the same module and debug info is used, then this leads to a verifier error: inlinable function call in a function with debug info must have a !dbg location call void @_Unwind_Resume(ptr %exn.obj) #0 Fix this by assigning a dummy location to the call. (As this happens in the backend, inlining is not actually relevant here.) Fixes https://github.com/llvm/llvm-project/issues/57469. Differential Revision: https://reviews.llvm.org/D133095 (cherry picked from commit 5134bd43) -
Corentin Jabot authored
Clang crashes when encountering an `if consteval` statement. This is the minimum fix not to crash. The fix is consistent with the current behavior of if constexpr, which does generate coverage data for the discarded branches. This is of course not correct and a better solution is needed for both if constexpr and if consteval. See https://github.com/llvm/llvm-project/issues/54419. Fixes #57377 Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D132723
-
- Sep 08, 2022
-
-
Utkarsh Saxena authored
As discussed in this [comment](https://github.com/llvm/llvm-project/issues/56183#issuecomment-1224331699), we end up building the lambda twice: once while parsing the function calls and then again while handling the immediate invocation. This happens specially during removing nested immediate invocation. Eg: When we have another consteval function as the parameter along with this lambda expression. Eg: `foo(bar([]{}))`, `foo(bar(), []{})` While removing such nested immediate invocations, we should not rebuild this lambda. (IIUC, rebuilding a lambda would always generate a new type which will never match the original type from parsing) Fixes: https://github.com/llvm/llvm-project/issues/56183 Fixes: https://github.com/llvm/llvm-project/issues/51695 Fixes: https://github.com/llvm/llvm-project/issues/50455 Fixes: https://github.com/llvm/llvm-project/issues/54872 Fixes: https://github.com/llvm/llvm-project/issues/54587 Differential Revision: https://reviews.llvm.org/D132945 (cherry picked from commit e7eec382)
-
Simon Pilgrim authored
We feed the result from the first extractShiftForRotate call into the second, and that result might no longer be a shift op (usually due to constant folding). NOTE: We REALLY need to stop creating nodes on the fly inside extractShiftForRotate! Fixes Issue #57474 (cherry picked from commit eaede4b5)
-
jackh authored
Fix commit `b646f095` and remove redundant code. Differential Revision: https://reviews.llvm.org/D131750 (cherry picked from commit ef71383b)
-
Michał Górny authored
Fix the is_binutils_lto_supported() function to handle missing executables gracefully. Currently, the function does not catch exceptions from subprocess.Popen() and therefore causes lit to crash if config.gold_executable does not specify a valid executable: ``` lit: /usr/lib/python3.11/site-packages/lit/TestingConfig.py:136: fatal: unable to parse config file '/tmp/portage/sys-libs/compiler-rt- 15.0.0/work/compiler-rt/test/lit.common.cfg.py', traceback: Traceback (most recent call last): File "/usr/lib/python3.11/site-packages/lit/TestingConfig.py", line 125, in load_from_path exec(compile(data, path, 'exec'), cfg_globals, None) File "/tmp/portage/sys-libs/compiler-rt-15.0.0/work/compiler-rt/test/lit.common.cfg.py", line 561, in <module> if is_binutils_lto_supported(): ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/portage/sys-libs/compiler-rt-15.0.0/work/compiler-rt/test/lit.common.cfg.py", line 543, in is_binutils_lto_supported ld_cmd = subprocess.Popen([exe, '--help'], stdout=subprocess.PIPE, env={'LANG': 'C'}) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/subprocess.py", line 1022, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "/usr/lib/python3.11/subprocess.py", line 1899, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'GOLD_EXECUTABLE-NOTFOUND' ``` Differential Revision: https://reviews.llvm.org/D133358 (cherry picked from commit ea953b9d)
-
- Sep 07, 2022
-
-
Daniel Thornburgh authored
This adds support for backtrace generation to the llvm-symbolizer markup filter, which is likely the largest use case. Reviewed By: peter.smith Differential Revision: https://reviews.llvm.org/D132706 (cherry picked from commit ea992255)
-
Daniel Thornburgh authored
(cherry picked from commit 0d6cf1e8)
-
Daniel Thornburgh authored
Implements the pc element for the symbolizing filter, including it's "ra" and "pc" modes. Return addresses ("ra") are adjusted by decrementing one. By default, {{{pc}}} elements are assumed to point to precise code ("pc") locations. Backtrace elements will adopt the opposite convention. Along the way, some minor refactors of value printing and colorization. Reviewed By: peter.smith Differential Revision: https://reviews.llvm.org/D131115 (cherry picked from commit bf48b128) -
Daniel Thornburgh authored
This connects the Symbolizer to the markup filter and enables the first working end-to-end flow using the filter. Reviewed By: peter.smith Differential Revision: https://reviews.llvm.org/D130187 (cherry picked from commit 22df238d)
-
David Stuttard authored
Src1 for mbcnt can be a non-zero literal or register. Take this into account when calculating known bits. Differential Revision: https://reviews.llvm.org/D131478 (cherry picked from commit 1d1cc055)
-
- Sep 05, 2022
-
-
Alex Bradbury authored
-
- Sep 04, 2022
-
-
Tobias Hieta authored
-
Philip Reames authored
This fixes https://github.com/llvm/llvm-project/issues/57336. It was exposed by a recent SCEV change, but appears to have been a long standing issue. Note that the whole insert into the loop instead of a split exit edge is slightly contrived to begin with; it's there solely because IndVarSimplify preserves the CFG. Differential Revision: https://reviews.llvm.org/D132571 (cherry picked from commit c37b1a5f)
-
- Sep 02, 2022
-
-
Nico Weber authored
Xcode 13's clang has them. For the included testcase, Xcode's clang behaves like the implementation in this patch. Availability.h in the macOS 12.0 SDK (part of Xcode 13, and the current stable version of the macOS SDK) does something like: #if defined(__has_builtin) ... #if __has_builtin(__is_target_os) #if __has_builtin(__is_target_environment) #if __has_builtin(__is_target_variant_os) #if __has_builtin(__is_target_variant_environment) #if (... && ((__is_target_os(ios) && __is_target_environment(macabi)) || (__is_target_variant_os(ios) && __is_target_variant_environment(macabi)))) #define __OSX_AVAILABLE_STARTING(_osx, _ios) ... #define __OSX_AVAILABLE_BUT_DEPRECATED(_osxIntro, _osxDep, _iosIntro, _iosDep) ... #define __OSX_AVAILABLE_BUT_DEPRECATED_MSG(_osxIntro, _osxDep, _iosIntro, _iosDep, _msg) ... So if __has_builtin(__is_target_variant_os) or __has_builtin(__is_target_variant_environment) are false, these defines are not defined. Most of the time, this doesn't matter. But open-source clang currently fails to commpile a file containing only `#include <Security/cssmtype.h>` when building for catalyst by adding a `-target arm64-apple-ios13.1-macabi` triple, due to those __OSX_AVAILABLE macros not being set correctly. If a potential future SDK version were to include cssmtype.h transitively from a common header such as `<Foundation/Foundation.h>`, then it would become close to impossible to build Catalyst binaries with open-source clang. To fix this for normal catalyst builds, it's only necessary that __has_builtin() evaluates to true for these two built-ins -- the implementation of them doesn't matter. But as a courtesy, a correct (at least on the test cases I tried) implementation is provided. (This should also help people who try to build zippered code, where having the correct implementation does matter.) Differential Revision: https://reviews.llvm.org/D132754
-