- Nov 28, 2023
-
-
Tobias Hieta authored
This reverts commit e957e6dc. The commit was reverted on main because of issues. We will not carry this in the release branch for 17.x
-
Brad Smith authored
(cherry picked from commit 23c47eba)
-
- Nov 27, 2023
-
-
Georgios Eleftheriou authored
``` 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) ``` -
Owen Pan authored
Fixed #54815. Fixed #55269. Fixed #55493. Fixed #68431.
-
Tulio Magno Quites Machado Filho authored
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 cf1bde33)
-
Lang Hames authored
This function does not return a value. https://github.com/llvm/llvm-project/issues/64418 (cherry picked from commit dce17939)
-
Brad Smith authored
(cherry picked from commit 51c5d749)
-
Tom Stellard authored
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 e746b56c)
-
Shao-Ce SUN authored
Fixes #69408 (cherry picked from commit f48dab52)
-
- Nov 24, 2023
-
-
Tom Stellard authored
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 7f215b13)
-
- Nov 20, 2023
-
-
Nathan Ridge authored
Fixes https://github.com/clangd/clangd/issues/1743 Differential Revision: https://reviews.llvm.org/D158851 (cherry picked from commit 1994e117)
-
Tobias Hieta authored
-
Utkarsh Saxena authored
-
Utkarsh Saxena authored
`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 93302611)
-
Ilya Biryukov authored
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 f722db02)
-
Arthur Eubanks authored
Revert "Reland [clang] Canonicalize system headers in dependency file when -canonical-prefixes" (#71697) This reverts commit 578a4716. 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.
-
YAMAMOTO Takashi authored
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 989ce069)
- Nov 14, 2023
-
-
Nikita Popov authored
`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 74a76a28)
-
Nikita Popov authored
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 e360a16f)
-
Jan Kokemüller authored
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 134c9159)
-
antoine moynault authored
Test still fail on ARM machine (no float_control support) (cherry picked from commit 5fdb70be)
-
Serge Pavlov authored
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 93ae2633)
-
Serge Pavlov authored
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 f6f625f4)
-
- Nov 13, 2023
-
-
Alexey Bataev authored
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 d79051f8)
-
Simon Pilgrim authored
Fixes Issue #70208 (cherry picked from commit c9c9bf0f)
-
Craig Topper authored
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 8d24d390)
-
Tobias Hieta authored
-
Rainer Orth authored
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 1e6b0df3)
-
Martin Storsjö authored
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 592e935e, 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 0d3eeac8)
-
Nick Desaulniers authored
Fixes a bug introduced by commit b54294e2 ("[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 d9b15b06)
-
- Oct 31, 2023
-
-
Nikita Popov authored
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 292f34b0)
-
Nikita Popov authored
(cherry picked from commit d9cfb822)
-
Nikita Popov authored
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 7f1733a2)
-
Piotr Zegar authored
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 a396fb24)
-
Brad Smith authored
Fixing ```#error "Unknown or unsupported OS"``` (cherry picked from commit 223852ae)
-
Konstantinos Parasyris authored
[OpenMP] Fixes #69905 (cherry picked from commit 01828c43)
-
David Truby authored
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 5f476b80)
-
David Truby authored
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 a6857156)
-