Age | Commit message (Collapse) | Author |
|
For the release/15.x branch.
Differential Revision: https://reviews.llvm.org/D130961
|
|
|
|
|
|
GCC inline asm document says that
"... the general rule is that the output variable must be a scalar
integer, and the value is boolean."
Commit e5c37958f901cc9bec50624dbee85d40143e4bca lowers flag output of
inline asm on X86 with setcc, hence it is guaranteed that the flag
is of boolean value. Clang does not support ARM inline asm flag output
yet so nothing need to be worried about ARM.
See "Flag Output" section at
https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html#OutputOperands
Fixes https://github.com/llvm/llvm-project/issues/56568
Reviewed By: nikic
Differential Revision: https://reviews.llvm.org/D129954
(cherry picked from commit 92c1bc61586c9d6c7bf0c36b1005fe00b4f48cc0)
|
|
(cherry picked from commit c64c3d31c42869c258ad174d9a754279ef4aa07d)
|
|
Differential Revision: https://reviews.llvm.org/D130532
(cherry picked from commit db7d7959787ed68f037e2a6e5a70bb0d8c17ab27)
|
|
Fixes https://github.com/llvm/llvm-project/issues/56504
Reviewed By: ldionne, Mordante, huixie90, #libc
Spies: libcxx-commits, hewillk
Differential Revision: https://reviews.llvm.org/D129794
(cherry picked from commit 7912b1f8e7c845a97411cbfc176db56861cdf116)
|
|
With the goal of reusing that handler to do other things besides
handling assertions (such as terminating when an exception is thrown
under -fno-exceptions), the name `__libcpp_assertion_handler` doesn't
really make sense anymore.
Furthermore, I didn't want to use the name `__libcpp_abort_handler`,
since that would give the impression that the handler is called
whenever `std::abort()` is called, which is not the case at all.
Differential Revision: https://reviews.llvm.org/D130562
(cherry picked from commit 507125af3d0b953cb56bce2e5b8000249fe1ef53)
|
|
implement `std::ranges::unique` and `std::ranges::unique_copy`
Differential Revision: https://reviews.llvm.org/D130404
(cherry picked from commit 72f57e3a30d597346feec74cf626796b0055680f)
|
|
This reintroduces the same workaround we have in libc++abi for older
Androids based on https://reviews.llvm.org/D130507#inline-1255914.
Differential Revision: https://reviews.llvm.org/D130708
(cherry picked from commit 1422a9689d7907a4561da7b906ec392840d9e635)
|
|
Avoid relying on `iterator_traits` and instead deduce the return type of
dereferencing the iterator. Additionally, add a static check to reject
iterators with incorrect `iterator_traits` at compile time.
Differential Revision: https://reviews.llvm.org/D130538
(cherry picked from commit b3afea1ce0bd3c9293edae67c1839318eecdd7bf)
|
|
(cherry picked from commit d5a3cc1d88d888e38633eb55e2afadb4cf788000)
|
|
Reviewed By: ldionne, huixie90, #libc
Spies: arichardson, sstefan1, libcxx-commits, mgorny
Differential Revision: https://reviews.llvm.org/D129040
(cherry picked from commit e01b4fe956dd038fed71cf3c552d3383905d022a)
|
|
Differential Revision: https://reviews.llvm.org/D130627
(cherry picked from commit 8a61749f767e9af773051fc4f6dc99276fe189e3)
|
|
Fix the LD_LIBRARY_PATH prepending order to make sure that
config.library_path ends up before any potentially-system directories
(e.g. config.hwloc_library_dir). This makes sure that we are testing
against the just-built openmp libraries rather than the version that is
already installed.
Also rename the function to `prepend_*` to make it clearer what it
actually does.
https://github.com/llvm/llvm-project/issues/56821
Differential Revision: https://reviews.llvm.org/D130825
(cherry picked from commit eb4612ca239bffbf1612e0bce442043e716bb9f5)
|
|
Differential Revision: https://reviews.llvm.org/D130837
(cherry picked from commit 09cf95bd3ec24c77a854a0e0d9431a6d4ba460bc)
|
|
(cherry picked from commit be3587ae9ab2289179eea0bf6b241d796524062a)
|
|
for the amount mask (PR56859)
matchRotateSub is given shift amounts that will already have stripped any/zero-extend nodes from - so make sure those values are wide enough to take a mask.
(cherry picked from commit b651fdff79027064071db7c1d0250553e3e6a232)
|
|
Now that the symbol version for libclang.so changes for each release again,
we need to remove the symbol versions from the shared library in order
for the ABI checker to be able to compare with an older version of the
shared library.
|
|
A symbol `$ld$previous$/Another$1.2.3$1$3.0$14.0$_xxx$` means
"pretend symbol `_xxx` is in dylib `/Another` with version `1.2.3`
if the deployment target is between `3.0` and `14.0` and we're
targeting platform `1` (ie macOS)".
This means dylibs can now inject synthetic dylibs into the link, so
DylibFile needs to grow a 3rd constructor.
The only other interesting thing is that such an injected dylib
counts as a use of the original dylib. This patch gets this mostly
right (if _only_ `$ld$previous` symbols are used from a dylib,
we don't add a dep on the dylib itself, matching ld64), but one case
where we don't match ld64 yet is that ld64 even omits the original
dylib when linking it with `-needed-l`. Lld currently still adds a load
command for the original dylib in that case. (That's for a future
patch.)
Fixes #56074.
Differential Revision: https://reviews.llvm.org/D130725
(cherry picked from commit 241f0e8b76d544a4a07a7f775b8421632539be19)
|
|
To make use of SPARC support in `getHostCPUName` as implemented by D130272
<https://reviews.llvm.org/D130272>, this patch uses it to handle
`-mcpu=native` and `-mtune=native`. To match GCC, this patch rejects
`-march` instead of silently treating it as a no-op.
Tested on `sparcv9-sun-solaris2.11` and checking that those options are
passed on as `-target-cpu` resp. `-tune-cpu` as expected.
Differential Revision: https://reviews.llvm.org/D130273
(cherry picked from commit bf3714884ae4b4a0301bc6af78e8b4deff12558b)
|
|
This is the Linux/sparc64 equivalent to D118021
<https://reviews.llvm.org/D118021>, necessary to provide an external
implementation of atomics on 32-bit SPARC which LLVM cannot inline even
with `-mcpu=v9` or an equivalent default.
Tested on `sparc64-unknown-linux-gnu`.
Differential Revision: https://reviews.llvm.org/D130569
(cherry picked from commit 9b1897bbd0e3a6e9ef099e74c3d3ed35428c0460)
|
|
While working on D118450 <https://reviews.llvm.org/D118450>, I noticed that
`sys::getHostCPUName` lacks SPARC support.
This patch implements it. The code is taken from/inspired by GCC's
`gcc/config/sparc/driver-sparc.cc`. There's one caveat: since LLVM, unlike
GCC, doesn't support the SPARC-M7, -S7, and -M8 CPUs, I map all those to
the latest supported one (UltraSparc T4/`niagara4`).
Tested on `sparcv9-sun-solaris2.11` and `sparc64-unknown-linux-gnu` by
running `savcov --version` on
- Netra SPARC S7-2 (SPARC-S7, Solaris 11.4)
- SPARC T5-2 (SPARC T5, Solaris 11.4)
- SPARC Enterprise T5220 (UltraSPARC T2, Solaris 11.3)
- SPARC T5 (UltraSPARC T5, Debian sid)
- SPARC T3 (UltraSPARC T3, Debian sid)
- SPARC Enterprise T5220 (Debian sid)
Differential Revision: https://reviews.llvm.org/D130272
(cherry picked from commit 979ddfff37d7e3bf258c2e5cbdc272fcb44c15f0)
|
|
When building on Linux/sparc64, the 32-bit `libclang_rt.asan.so`,
`libclang_rt.ubsan_minimal.so`, and `libclang_rt.ubsan_standalone.so`
failed to link with undefined references to 64-bit atomics, which `clang`
cannot inline. Even D130569 <https://reviews.llvm.org/D130569> didn't help
because those libraries are linked with `-nodefaultlibs`, so dependent
libraries need to be added explicitly.
That's what this patch does.
Tested on `sparc64-unknown-linux-gnu` and `sparcv9-sun-solaris2.11`.
Differential Revision: https://reviews.llvm.org/D130571
(cherry picked from commit 0b2d5fd48bc281af89e5e7bfa33a3054b826ed52)
|
|
Fixes compilation error.
Differential Revision: https://reviews.llvm.org/D130898
(cherry picked from commit 5680ef870f9058c4b52a09a6aec2ddf384c5a558)
|
|
From inspection of
git log origin/release/14.x..origin/release/15.x -- lld/MachO
Reviewed By: #lld-macho, thakis
Differential Revision: https://reviews.llvm.org/D130850
|
|
The behaviour of this patch is not great, but it has some side-effects
that are required for OpenMPOpt to work. The problem is that when we use
`-mlink-builtin-bitcode` we only import used symbols from the runtime.
Then OpenMPOpt will insert calls to symbols that were not previously
included. This patch removed this implicit behaviour as these functions
were kept alive by the `noinline` simply because it kept calls to them
in the module. This caused regression in some tests that relied on some
OpenMPOpt passes without using LTO. Reverting for the LLVM15 release but
will try to fix it more correctly on main.
This reverts commit d61d72dae604c3258e25c00622b1a85861450303.
Fixes #56752
(cherry picked from commit b08369f7f288b6efb0897953da42ed54e60cfc0b)
|
|
avoid building when cross compiling
This is similar to the LLVM_TABLEGEN, CLANG_TABLEGEN and
CLANG_PSEUDO_GEN cmake cache variables.
Differential Revision: https://reviews.llvm.org/D129799
(cherry picked from commit dc95d0c525636aed53a3b38258efa2dff4c83edf)
|
|
Rename it to clang-tidy-confusable-chars-gen, to make its role
clearer in a wider context.
In cross builds, the caller might want to provide this tool
externally (to avoid needing to rebuild it in the cross build).
In such a case, having the tool properly namespaced makes its role
clearer.
This matches how the clang-pseudo-gen tool was renamed in
a43fef05d4fae32f02365c7b8fef2aa631d23628 / D126725.
Differential Revision: https://reviews.llvm.org/D129798
(cherry picked from commit 18b4a8bcf3553174f770f09528c9bd01c8cebfe7)
|
|
This adds a +atomic-32 target feature, which instructs LLVM to assume
that lock-free 32-bit atomics are available for this target, even
if they usually wouldn't be.
If only atomic loads/stores are used, then this won't emit libcalls.
If atomic CAS is used, then the user is responsible for providing
any necessary __sync implementations (e.g. by masking interrupts
for single-core privileged use cases).
See https://reviews.llvm.org/D120026#3674333 for context on this
change. The tl;dr is that the thumbv6m target in Rust has
historically made atomic load/store only available, which is
incompatible with the change from D120026, which switched these to
use libatomic.
Differential Revision: https://reviews.llvm.org/D130480
(cherry picked from commit b1b1086973d5be26f127540852ace59c5119e90a)
|
|
The test is brittle but it seems unnecessary to remove size check now.
Close #56222
(cherry picked from commit 876af563e73a3c1d6b49e13b4c1791a4208c8546)
|
|
Fixes issue 56398
(cherry picked from commit 9cc1dd209d20eda51710f302800899730b419381)
|
|
Reviewed By: #libc, ldionne
Spies: mgorny, var-const, ormris, philnik, miscco, hiraditya, steven_wu, jkorous, ldionne, christof, libcxx-commits
Differential Revision: https://reviews.llvm.org/D68365
(cherry picked from commit 98d3d5b5da66e3cf7807c23a0294280bb796466b)
|
|
outdir is defined in the line above, it will not exist in the install
command, so it should not be escaped.
(cherry picked from commit 50716ba2b337afe46ac256cc91673dc27356a776)
|
|
macos-10.15 is deprecated and will be removed.
(cherry picked from commit d9e02a30b16ea65a7da87913c40af03e22c9571f)
|
|
(cherry picked from commit 51ba98d058c24632b86b79af5a4ddf6c5ab4e614)
|
|
|
|
Fix unused variable in non-assert builds after
300fbf56f89aebbe2ef9ed490066bab23e5356d1
|
|
This is still undocumented and unsupported, but if someone passed it
before you would end up with a missing file error since this takes an
argument that wouldn't be handled.
Differential Revision: https://reviews.llvm.org/D130606
|
|
|
|
We are supporting quadword lock free atomics on AIX. For the situation that users on AIX are using a libatomic that is lock-based for quadword types, we can't enable quadword lock free atomics by default on AIX in case user's new code and existing code accessing the same shared atomic quadword variable, we can't guarentee atomicity. So we need an option to enable quadword lock free atomics on AIX, thus we can build a quadword lock-free libatomic(also for advanced users considering atomic performance critical) for users to make the transition smooth.
Reviewed By: shchenz
Differential Revision: https://reviews.llvm.org/D127189
|
|
Added alloca optimization which was missed during the implemenation of D112098.
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D130503
|
|
|
|
|
|
The IR Verifier requires that every call instruction to an inlineable
function (among other things, its implementation must be visible in the
translation unit) must also have !dbg metadata attached to it. When
parallelizing, Polly emits calls to OpenMP runtime function out of thin
air, or at least not directly derived from a bounded list of previous
instruction. While we could search for instructions in the SCoP that has
some debug info attached to it, there is no guarantee that we find any.
Our solution is to generate a new DILocation that points to line 0 to
represent optimized code.
The OpenMP function implementation is usually not available in the
user's translation unit, but can become visible in an LTO build. For
the bug to appear, libomp must also be built with debug symbols.
IMHO, the IR verifier rule is too strict. Runtime functions can
also be inserted by other optimization passes, such as
LoopIdiomRecognize. When inserting a call to e.g. memset, it uses the
DebugLoc from a StoreInst from the unoptimized code. It is not
required to have !dbg metadata attached either.
Fixes #56692
|
|
|
|
Reviewed By: asl
Differential Revision: https://reviews.llvm.org/D129880
|
|
|
|
The tests still only run on pushes or pull requests for the release
branch, but having it in the main branch means we don't have to copy
the tests every time we create a new release branch.
Reviewed By: asl
Differential Revision: https://reviews.llvm.org/D129526
|
|
Differential Revision: https://reviews.llvm.org/D130330
|