Age | Commit message (Collapse) | Author | Files | Lines |
|
This reverts commit e957e6dcb29d94e4e1678da9829b77009be88926.
The commit was reverted on main because of issues. We will not carry
this in the release branch for 17.x
|
|
(cherry picked from commit 23c47eba879769a29772c999be2991201c2fe399)
|
|
```
src_dir/clang/lib/Tooling/DumpTool/generate_cxx_src_locs.py:28: SyntaxWarning: invalid escape sequence '\*' self.implementationContent += """
src_dir/llvm/utils/lit/lit/TestRunner.py:205: SyntaxWarning: invalid escape sequence '\c' """
src_dir/llvm/utils/lit/lit/TestRunner.py:1561: SyntaxWarning: invalid escape sequence '\s' match = _caching_re_compile("^\s*%else\s*(%{)?").search(ln)
src_dir/libcxx/utils/libcxx/test/format.py:64: SyntaxWarning: invalid escape sequence '\s' for output in re.split('[$]\s*":"\s*"RUN: at line \d+"', fullOutput):
src_dir/libcxx/utils/libcxx/test/params.py:121: SyntaxWarning: invalid escape sequence '\+' AddSubstitution("%{cxx_std}", re.sub("\+", "x", std)),
src_dir/libcxx/utils/libcxx/test/params.py:214: SyntaxWarning: invalid escape sequence '\+' AddFeature("stdlib=libc++") if re.match(".+-libc\+\+", stdlib) else None,
src_dir/compiler-rt/test/lit.common.cfg.py:800: SyntaxWarning: invalid escape sequence '\$' "-Wl,-z,origin -Wl,-rpath,\$ORIGIN -L%T -l%xdynamiclib_namespec"
src_dir/compiler-rt/test/lit.common.cfg.py:809: SyntaxWarning: invalid escape sequence '\$' "-Wl,-rpath,\$ORIGIN -L%T -l%xdynamiclib_namespec" + postfix,
src_dir/compiler-rt/test/lit.common.cfg.py:817: SyntaxWarning: invalid escape sequence '\$' "-Wl,-R\$ORIGIN -L%T -l%xdynamiclib_namespec" + postfix,
src_dir/llvm/test/lit.cfg.py:275: SyntaxWarning: invalid escape sequence '\d' match = re.search("release (\d+)\.(\d+)", ptxas_out)
```
|
|
Fixed #54815.
Fixed #55269.
Fixed #55493.
Fixed #68431.
|
|
Struct Module::Header is not a POD type. As such, qsort() and
llvm::array_pod_sort() must not be used to sort it. This became an issue
with the new implementation of qsort() in glibc 2.39 that is not
guaranteed to be a stable sort, causing Headers to be re-ordered and
corrupted.
Replace the usage of llvm::array_pod_sort() with std::stable_sort() in
order to fix this issue. The signature of compareModuleHeaders() has to
be modified.
Fixes #73145.
(cherry picked from commit cf1bde33423da5eb9b7dc95daac4aada3167de3c)
|
|
This function does not return a value.
https://github.com/llvm/llvm-project/issues/64418
(cherry picked from commit dce179396e7e547fe6b42f0f9625b49212e6ec0b)
|
|
(cherry picked from commit 51c5d74940c3a6682ccd44491cb40c7e26fb83e5)
|
|
Build clang with the host compiler and ccache enabled in order to speed
up the phase 1 builds. This helps reduce the amount of time spent
running on the non-free builders.
(cherry picked from commit e746b56c98f6180cffd4cad9ebdd249bdaa17283)
|
|
Fixes #69408
(cherry picked from commit f48dab523784252448dbd42e72f0048ee0463368)
|
|
The test-depends target contained all the dependencies needed to run the
runtimes tests, but it was never added as a dependency of check-all.
This caused some of the tsan tests to fail, since the custom libcxx
build the tests were looking for was never built. Besides the tsan
failures, this fixes all the other test failures I was seeing with:
cmake -G Ninja -B release-build -S llvm \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_ASSERTIONS=OFF \
-DLLVM_ENABLE_PROJECTS="clang;lld" \
-DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind;compiler-rt"
This is the same configuration the test-release.sh script uses, so I'm
hoping this will also fix all the test failures we've been seeing when
building the releases.
Fixes #58680
(cherry picked from commit 7f215b1380da49dccbf57da3040a40d25ed898f4)
|
|
Fixed #72785.
(cherry picked from commit 5860d248a780aaef860db3d54184b49fc758c3c1)
|
|
Fixes https://github.com/clangd/clangd/issues/1743
Differential Revision: https://reviews.llvm.org/D158851
(cherry picked from commit 1994e1173b64b61c07f8acf107f29c2c015575b4)
|
|
|
|
|
|
`S.getScopeForContext` determins the **active** scope associated with
the given `declContext`.
This fails to find the matching `operator!=` if candidate `operator==`
was found via ADL since that scope is not active.
Instead, just directly lookup using the namespace decl of `operator==`
Fixes #68901
(cherry picked from commit 9330261143ccbe947ef0687fd20747ba47f26879)
|
|
Fixes #68051.
Current implementation passes the number of `_AlignedStorage` objects
when it calls to `allocate` and the number of **bytes** on `deallocate`.
This only applies to allocations that allocate control block and the
storage together, i.e. `make_shared` and `allocate_shared`.
Found by ASan under Clang combined with `-fsized-deallocation`.
(cherry picked from commit f722db02d359e29ca001b78197ee1a275f8c3d7c)
|
|
-canonical-prefixes" (#71697)
This reverts commit 578a4716f549167165a2ec3bac89c86706136d4e.
This causes multiple issues. Compile time slowdown due to more path
canonicalization, and weird behavior on Windows.
Will reland under a separate flag `-f[no-]canonical-system-headers` to
match gcc in the future and further limit when it's passed by default.
Fixes #70011.
|
|
This allows -mexec-model=reactor -shared produces a library module
with _initialize entrypoint, which is preferrable over __wasm_call_ctors.
This partially reverts https://reviews.llvm.org/D153293
Discussion: https://github.com/dicej/component-linking-demo/issues/3
Reviewed By: sbc100
Differential Revision: https://reviews.llvm.org/D156205
(cherry picked from commit 989ce069a4638fd561bebc95f478ca9e45154fec)
|
|
`MergePotentialElts::operator<` asserts that the two elements being
compared are not equal. However, sorting functions are allowed to invoke
the comparison function with equal arguments (though they usually don't
for efficiency reasons).
There is an existing special-case that disables the assert if
_GLIBCXX_DEBUG is used, which may invoke the comparator with equal args
to verify strict weak ordering. I believe libc++ also has strict weak
ordering checks under some options nowadays.
Recently, #71312 was reported, where a change to glibc's qsort_r
implementation can also result in comparison between equal elements.
From what I understood, this is an inefficiency that will be fixed on
the glibc side as well, but I think at this point we should just remove
this assertion.
Fixes https://github.com/llvm/llvm-project/issues/71312.
(cherry picked from commit 74a76a288562c486f377121855ef7db0386e0e43)
|
|
The hasAddressTaken() call in hasOnlyColdCalls() has quadratic
complexity if there are many cold calls to a function: We're going to
visit each call of the function, and then for each of them iterate all
the users of the function.
We've recently encountered a case where GlobalOpt spends more than an
hour in these hasAddressTaken() checks when full LTO is used.
Avoid this by moving the hasAddressTaken() check into hasChangeableCC()
and caching its result, so it is only computed once per function.
(cherry picked from commit e360a16fee2dc3cb632ace556fb715832f488a90)
|
|
The calls to std::construct_at might overwrite the previously set
__has_value_ flag in the case where the flag is overlapping with
the actual value or error being stored (since we use [[no_unique_address]]).
To fix this issue, this patch ensures that we initialize the
__has_value_ flag after we call std::construct_at.
Fixes #68552
(cherry picked from commit 134c91595568ea1335b22e559f20c1a488ea270e)
|
|
Test still fail on ARM machine (no float_control support)
(cherry picked from commit 5fdb70be7b0a1340a7ebdeb94ab073e466fc4aa6)
|
|
The test Sema/PR69717.cpp fails on platforms that do not support
pragma float_control. So run this test on x86 only.
(cherry picked from commit 93ae26331592f41bf2b1d10b048743d80c468385)
|
|
When instantiation function, a call to Sema::resetFPOption was used to
set the FP options associated with AST node. However this function also
cleared FP pragma stack, and it is incorrect. Template instantiation
takes place on AST representation and semantic information like the FP
pragma stack should not affect it. This was a reason for miscompilation
in some cases.
To make the Sema interface more consistent, now `resetFPOptions` does
not clear FP pragma stack anymore. It is cleared in
`FpPragmaStackSaveRAII`, which is used in parsing only.
This change must fix https://github.com/llvm/llvm-project/issues/69717
(Problems with float_control pragma stack in Clang 17.x).
(cherry picked from commit f6f625f4c6c3cbeb8cf6b889cdafc848dd4cb117)
|
|
No need to change the insert point for reduction gather node, we can use
the ReductionRoot as insert point instead to avoid possible crashes.
(cherry picked from commit d79051f894129428ec36dedc6bbfdfdcc1bd0c17)
|
|
Fixes Issue #70208
(cherry picked from commit c9c9bf0f20fd820b86fac35113bbd8049ff4e72a)
|
|
If we start with an i128 shift, the initial shift amount would usually
have zeros in bit 8 and above. xoring the shift amount with -1 will set
those upper bits to 1. If DAGCombiner is able to prove those bits are
now 1, then the shift that uses the xor will be replaced with undef.
Which we don't want.
Reduce the xor constant to VT.bits-1 where VT is half the size of the
larger shift type. This avoids toggling the upper bits. The hardware
shift instruction only uses the lower bits of the shift amount. I assume
the code used NOT because the hardware doesn't use the upper bits, but
that isn't compatible with the LLVM poison semantics.
Fixes #71142.
(cherry picked from commit 8d24d3900ec3f28902b2fad4a2c2c2b789257424)
|
|
Fixes #66890.
(cherry picked from commit 67b99fa8ba638edddd5ce38b4d379eab8e339e4a)
|
|
|
|
As noticed in D158846, the Solaris driver deviates from other targets in
that it links every executable with `-lm`, but doesn't for shared
objects. For C code, this is unnecessary, while for C++ `libm` is always
needed, even for shared objects.
This patch fixes this by following the `Gnu.cpp` precedent. It adjusts
the `solaris-ld.c` test accordingly, adding some more tests.
Tested on `amd64-pc-solaris2.11`, `sparcv9-sun-solaris2.11`, and
`x86_64-pc-linux-gnu`.
(cherry picked from commit 1e6b0df3503567488e7df2d574c90f8f31a001a2)
|
|
(#71393)
A few symbols within libclangInterpreter have got explicit dllexport
attributes, in order to make them exported (and thus visible at runtime)
in any build, not only when they are part of e.g. a DLL libclang-cpp,
but also when they are part of a plain .exe.
Due to the explicit dllexports, these symbols would sidestep the regular
MinGW logic of exporting all symbols if there are no dllexports.
Therefore, for libclang-cpp, a separate fix was made in
592e935e115ffb451eb9b782376711dab6558fe0, to pass --export-all-symbols
to the build of libclang-cpp.
If building with BUILD_SHARED_LIBS enabled, then the same issue appears
in libclangInterpreter; pass the same flag --export-all-symbols there as
well, to make sure all symbols are visible, not only the ones that are
explicitly marked as dllexport.
(cherry picked from commit 0d3eeac8c0f45410398a87f72ae38ea6ae1c3073)
|
|
destinations (#70366)
Fixes a bug introduced by
commit b54294e2c959 ("[clang][ConstantEmitter] have
tryEmitPrivate[ForVarInit] try ConstExprEmitter fast-path first")
In the added test case, the QualType is a LValueReferenceType.
LValueReferenceType 0x558412998d90 'const char (&)[41]'
`-ParenType 0x558412998d30 'const char[41]' sugar
`-ConstantArrayType 0x558412998cf0 'const char[41]' 41
`-QualType 0x55841294c271 'const char' const
`-BuiltinType 0x55841294c270 'char'
Fixes: #69979
(cherry picked from commit d9b15b068d19089f72fc0d7dc59ed1d6d77125dc)
|
|
The check for whether a tail call is supported calls
determineAssignments(), which may modify argument flags. As such, even
though the check fails and a non-tail call will be emitted, it will not
have a different (incorrect) ABI.
Fix this by operating on a separate copy of the arguments.
Fixes https://github.com/llvm/llvm-project/issues/70207.
(cherry picked from commit 292f34b0d3cb2a04be5ebb85aaeb838b29f71323)
|
|
(cherry picked from commit d9cfb82207035fc7382ad02ec827c0dbed96565c)
|
|
replaceValuesPerBlockEntry() only handled simple and coerced load
values, however the load may also be referenced by a select value.
Additionally, I suspect that the previous code might have been incorrect
if a load had an offset, as it always constructed the AvailableValue
from scratch.
Fixes https://github.com/llvm/llvm-project/issues/69301.
(cherry picked from commit 7f1733a252cbbad74445bd54dc95aeec52bb3199)
|
|
Resolved the crash that occurred during the use of a user-defined
C-style string literal. The fix entails checking whether the identifier
is non-empty before attempting to read its name.
(cherry picked from commit a396fb247e0719f56a830a9e4aab0449be7f843a)
|
|
Fixing ```#error "Unknown or unsupported OS"```
(cherry picked from commit 223852aecf3f01cea21c40ea128a26f6a194345d)
|
|
[OpenMP] Fixes #69905
(cherry picked from commit 01828c4323172db5901ac3e959d52553b2bd74e5)
|
|
This fixes a bug where functions generated by the MLIR Math dialect, for
example ipowi, would fail to link with link.exe on Windows due to having
linkonce linkage but no associated comdat. Adding the comdat on ELF also
allows linkers to perform better garbage collection in the binary.
Simply adding comdats to all functions with this linkage type should
also cover future cases where linkonce or linkonce_odr functions might
be necessary.
(cherry picked from commit 5f476b80e3d472f672f5f6a719eebe2c0aadf52c)
|
|
This adds a new pass to add an Any comdat to each linkonce
and linkonce_odr function in the LLVM dialect. These comdats are
necessary on Windows
to allow the default system linker to link binaries containing these
functions.
(cherry picked from commit a6857156df9a73720fbd9633067d1a61c32dd74e)
|
|
|
|
https://reviews.llvm.org/D146358 was assuming that all subobjects have
their own name (`SubobjectDecl`), but it was not true for array
elements.
Fixes https://github.com/llvm/llvm-project/issues/67317
|
|
GPRF64 represents a pair of registers. We were only copying the even
part. We need to copy the odd part too.
|
|
index. (#70315)
When partially packing an offset into an SVE load/store instruction we
are incorrectly calculating the remainder.
(cherry picked from commit 7c90be2857fc4c6a2e67f203ca289ed7773fae03)
|
|
Fixes #70578.
(cherry picked from commit 0c4f326d8bc97a2fdb0533a68dbe1a7164da3911)
|
|
OpenBSD (#65553)
Use the getthrid() function instead of a syscall.
(cherry picked from commit 7e31b45d6a2571ff17426930dcbb784473a965b4)
|
|
As explained in `__config`, we have an ABI tag that we use to ensure
that we don't run into ODR issues when mixing different versions of
libc++ in multiple TUs. However, the reasoning behind that extends not
only to different versions of libc++, but also to different
configurations of the same version of libc++. In fact, we've been aware
of this for a while but never really bothered to make the change because
ODR issues are often thought to be benign.
Well, it turns out that I just spent over an hour banging my head
against an issue that boils down to our lack of encoding of some ODR
properties in the ABI tag, so here's the patch we should have done a
long time ago.
For now, the ODR properties we encode in the ABI tag are:
- library version
- exceptions vs no-exceptions
- hardening mode
Those are all things that we support different values for on a per-TU
basis and they definitely affect ODR in a meaningful way. We can add
more properties later as we see fit.
(cherry picked from commit bc792a284362696c91599f9ab01f74eda4b9108f)
|
|
This patch prevents argument promotion from promoting pointers to
fixed-length vector types larger than 128 bits like `<8 x float>` into
the values of the pointees.
Such vector types are used for SVE VLS but there is no ABI for SVE VLS
arguments and the backend cannot lower such value arguments.
Fixes #69147
(cherry picked from commit 926173c614784149889b2c975adccf52bcece75b)
|
|
With this patch, all CFRs can be used for register allocation.
(cherry picked from commit 271087e3a0875672b26c185a28b3552d5600d2fb)
|
|
pointers"
This reverts commit a84e0b4bdc9999872adbdaafbade8164b197784b.
Fixes #68079.
(cherry picked from commit 7bc1031c474ebb2216a5432273dafe4d1490fbce)
|