- Feb 09, 2023
-
-
Fangrui Song authored
Remarks.exports is only intended for NOT (BUILD_SHARED_LIBS OR LLVM_LINK_LLVM_DYLIB) builds. For (unintended use case) BUILD_SHARED_LIBS OR LLVM_LINK_LLVM_DYLIB (the latter is used by some Linux distros), the library defines just one symbol on ELF. There is no need to use a version script. I think this is a more proper solution than D139932 and fixes `symbol not defined` errors after lld default change D135402. (cherry picked from commit bf07de38)
-
Fangrui Song authored
These dissembler symbols are not used by LTO (see Apple ld64's use in check-llvm-tools-lto). On ELF platforms, these symbols are not defined and are rejected by ld --no-undefined-version. I think this is a more proper solution than D139932 and this fixes -DBUILD_SHARED_LIBS=on for ELF as well. (cherry picked from commit c294bdd6)
-
Nick Desaulniers authored
If this successor list is not correct, then branch-folding may incorrectly think that the indirect target is dead and remove it. This results in a dangling reference to the removed block as an operand to the INLINEASM_BR, which later will get AsmPrinted into code that doesn't assemble. This was made more obvious by, but is not a regression of https://reviews.llvm.org/D130316. Fixes: https://github.com/llvm/llvm-project/issues/60346 Reviewed By: efriedma, void Differential Revision: https://reviews.llvm.org/D142924 (cherry picked from commit 07c7784d)
-
Nick Desaulniers authored
Link: https://github.com/llvm/llvm-project/issues/60346 Reviewed By: efriedma, void Differential Revision: https://reviews.llvm.org/D142923 (cherry picked from commit 1cecfa40)
-
Tobias Hieta authored
If you are missing the iOS SDK on your macOS (for example you don't have full Xcode but just CommandLineTools) then CMake currently errors out without a helpful message. This patch disables iOS support in compiler-rt if the iOS SDK is not found. This can be overriden by passing -DCOMPILER_RT_ENABLE_IOS=ON. Reviewed By: delcypher, thetruestblue Differential Revision: https://reviews.llvm.org/D133273 (cherry picked from commit 78fb0210)
-
- Feb 08, 2023
-
-
Paul Walker authored
When lowering predicate permute builtins we incorrectly assume only the typically "active" bits for the specified element type play a role with all other bits zero'd. This is not the case because all bits are significant, with the element type specifying how they are grouped: b8 - permute using a block size of 1 bit b16 - permute using a block size of 2 bits b32 - permute using a block size of 4 bits b64 - permute using a block size of 8 bits The affected builtins are svrev, svtrn1, svtrn2, svuzp1, svuzp2, svzip1 and svzip2. This patch adds new intrinsics to support these operations and changes the builtin lowering code to emit them. The b8 case remains unchanged because for that operation the existing intrinsics work as required and their support for other predicate types has been maintained as useful if only as a way to test the correctness of their matching ISD nodes that code generation relies on. Differential Revision: https://reviews.llvm.org/D142065 (cherry picked from commit 26b79ca3)
-
Craig Topper authored
This is an alternative to D141074 to fix the problem by adjusting the precision control dynamically. Reviewed By: icedrocket Differential Revision: https://reviews.llvm.org/D142178 (cherry picked from commit 11fb09ec)
-
Daniel Thornburgh authored
Indexed profiles already have a sorted and uniqued binary ID list, and due to this, duplicates are harmless in the list of binary IDs found, since it's set_differenced from the list in the indexed profile. Differential Revision: https://reviews.llvm.org/D136702 (cherry picked from commit 0a51eeda)
-
Daniel Thornburgh authored
Differential Revision: https://reviews.llvm.org/D136702 (cherry picked from commit 0eb01a9c)
-
Daniel Thornburgh authored
Differential Revision: https://reviews.llvm.org/D136702 (cherry picked from commit 9977b65a)
-
Daniel Thornburgh authored
Reviewed By: gulfem Differential Revision: https://reviews.llvm.org/D136702 (cherry picked from commit a3b0dde4)
-
Kirill Stoimenov authored
Reviewed By: kstoimenov Differential Revision: https://reviews.llvm.org/D142561 (cherry picked from commit 33486992)
-
Mark de Wever authored
The constexpr validation parsed parts of the format string that didn't belong to the specific replacement field. Fixes https://llvm.org/PR60536 Reviewed By: #libc, ldionne Differential Revision: https://reviews.llvm.org/D143402 (cherry picked from commit ac44dadc)
-
Jonas Hahnfeld authored
(cherry picked from commit e302c04c)
-
Jonas Hahnfeld authored
The Language Reference says that aliases can have available_externally linkage if their aliasee is an available_externally global value. Using this kind of aliases resulted in crashes during code generation, filter them out (the same that the AsmPrinter also filters out GlobalVariables in emitSpecialLLVMGlobal(); Functions are discarded in the machine pass infrastructure). Differential Revision: https://reviews.llvm.org/D142352 (cherry picked from commit f1c4f927)
-
Joseph Huber authored
Summary: The logic here is to add the `.cubin` temporary file if we had to create a new filename to handle it. Unfortuantely the logic was wrong because we compare `const char *` values here. This logic seems to have been wrong for some time, but was never noticed since we never used the relocatable output.
-
Krzysztof Parzyszek authored
(cherry picked from commit 140bc411)
-
- Feb 07, 2023
-
-
Bill Wendling authored
If a struct/enum type used in a record doesn't have a forward decl / def, an implicit one is injected into the struct. This stops clang from randomizing the structure in some situations---i.e. when the struct contains only function pointers. So we accept forward decls so they don't prevent randomization. Fixes 60349 Reviewed By: MaskRay, nickdesaulniers Differential Revision: https://reviews.llvm.org/D143300 (cherry picked from commit f85a9a64)
-
Jonas Hahnfeld authored
According to the IR verifier, "Declaration[s] may not be in a Comdat!" This is a re-commit of 76b3f0b4 and 87d78382 with updates to the test: * Force emission of the extra-module, to trigger the bug after D138264, by providing a second symbol @g, and making the comdat nodeduplicate. (Technically only one is needed, but two should be safer.) * Name the comdat $f to avoid failure on Windows: LLVM ERROR: Associative COMDAT symbol 'c' does not exist. * Mark the test as UNSUPPORTED on macOS, MachO doesn't support COMDATs. Differential Revision: https://reviews.llvm.org/D142443 (cherry picked from commit 50ca8b3e)
-
Johannes Doerfert authored
There were missing checks in the aligned region code, copy-paste errors (= usage of the IsReachedFromAlignedBarrierOnly value instead of IsReachingAlignedBarrierOnly value on the forward pass), and a missing update of the call state for sync declarations and definitions. Partially fixes https://github.com/llvm/llvm-project/issues/60425 (cherry picked from commit 578d5073)
-
Johannes Doerfert authored
Before we might have ended up queriying the AAExecutionDomain of a different function, which resulted in wrong optimistic results. Partially fixes https://github.com/llvm/llvm-project/issues/60425 (cherry picked from commit 18a2975b)
-
Johannes Doerfert authored
We improved our simplification and this exposed a bug in the store elimination. A load that had dead uses and assume uses was thought to be used by assumes only. Consequently we also deleted the "dead use users". This was a problem because a dead use just means we will not use the load there. The user might still be needed. Exposed by OvO, reported by @ye-luo. (cherry picked from commit a51ad873)
-
Rainer Orth authored
`test-release.sh` is too silent in some cases: - Only the build proper is run verbosely, but `check-all` is not. - `lit` is run without `-v`, so in case of failures one cannot see what's actually wrong. This patch fixes both issues, running all `${MAKE}` invocations with `$Verbose` (except for `${MAKE} install` where it would only add noise), and running `lit` with `-v`. Tested on `x86_64-pc-linux-gnu` and `arm64-apple-darwin21.6`. Differential Revision: https://reviews.llvm.org/D143249 (cherry picked from commit 8d2d8e02) -
Fangrui Song authored
Fix https://github.com/llvm/llvm-project/issues/60392 ``` // a.cc void raise() { throw 42; } bool foo() { try { raise(); } catch (int) { return true; } return false; } int main() { foo(); } ``` ``` clang++ --target=x86_64-linux-gnu -fno-pic -mcmodel=large -no-pie -fuse-ld=lld -z notext a.cc -o a && ./a clang++ --target=aarch64-linux-gnu -fno-pic -no-pie -fuse-ld=lld -Wl,--dynamic-linker=/usr/aarch64-linux-gnu/lib/ld-linux-aarch64.so.1 -Wl,-rpath=/usr/aarch64-linux-gnu/lib -z notext a.cc -o a && ./a ``` Both commands fail because we produce a dynamic relocation for R_X86_64_64/R_AARCH64_ABS64 in .eh_frame which will be adjusted to a wrong offset by `SectionBase::getOffset` after D122459. Since GNU ld uses a canonical PLT entry instead of a dynamic relocation for .eh_frame, we follow suit as well to avoid the issue. Mips has an ABI issue (https://github.com/llvm/llvm-project/issues/5837) and we don't implement GNU ld's DW_EH_PE_absptr conversion. mips64-eh-abs-reloc.s wants a dynamic relocation, so keep the original behavior for EM_MIPS. Differential Revision: https://reviews.llvm.org/D143136 (cherry picked from commit 08c915fa)
-
Joseph Huber authored
There were intemittent errors in the linker wrapper when using the sanitizers in parallel. First, this is because the `TempFiles` global was not guarded when creating a new file. Second, even though the `Args` list is passed as const, the internal state is mutable when adding a string. So that needs to be guarded too. Fixes https://github.com/llvm/llvm-project/issues/60437 Reviewed By: tianshilei1992 Differential Revision: https://reviews.llvm.org/D142985 (cherry picked from commit 9c4591d7)
-
- Feb 06, 2023
-
-
Joe Loser authored
The current behavior for AMX macros is: ``` gcc -march=native -dM -E - < /dev/null | grep TILE clang -march=native -dM -E - < /dev/null | grep TILE ``` which is not ideal. Change `__AMXTILE__` and friends to `__AMX_TILE__` (i.e. have an underscore in them). This makes GCC and Clang agree on the naming of these AMX macros to simplify downstream user code. Fix this for `__AMXTILE__`, `__AMX_INT8__`, `__AMX_BF16__`, and `__AMX_FP16__`. Differential Revision: https://reviews.llvm.org/D143094 (cherry picked from commit 8998fa6c)
-
Tom Honermann authored
When support for declaring the c8rtomb() and mbrtoc8() functions within the std namespace was added in commit 7e7013c5, internal glibc macros were used to determine if C2X extensions are enabled. Specifically, a check for whether `__GLIBC_USE` is defined and whether `__GLIBC_USE(ISOC2X)` is non-0 was added. `__GLIBC_USE` is an internal detail of the glibc implementation that may be changed or removed in the future potentially leading to inconsistency or compilation failures. This change removes the use of the internal glibc macro to avoid such problems. Unfortunately, without another mechanism to determine if C2X extensions are enabled, this removal will result in inconsistent declarations of the c8rtomb() and mbrtoc8() functions; when C++ char8_t support is not enabled, but C2X extensions are, these functions will be declared in the global namespace but not in the std namespace. This situation will improve when C23 support is finalized and the check can be re-implemented using `__STDC_VERSION__`. (cherry picked from commit cf93a3dd)
-
Sam James authored
Without this, if hardening measures like FORTIFY_SOURCE are are in /etc/clang/*.cfg, many sanitizer tests will die before the sanitizer can trap the problem being tested, because e.g. the _chk variants of common functions will abort first. This gets the number of failing tests down from 42->3 for me (and the remaining 3 are unrelated). See: 52ce6776 See: 136f7780 Closes: https://github.com/llvm/llvm-project/issues/60394 Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D143322 (cherry picked from commit 8ab76255)
-
eopXD authored
The LLVM now supports v0.11 of the RVV intrinsics. Users can use the macro `riscv_v_intrinsic` to distinguish what kind of intrinsics is supported in the compiler. Please refer to tag descriptions under https://github.com/riscv-non-isa/rvv-intrinsic-doc/tags Reviewed By: kito-cheng, asb Differential Revision: https://reviews.llvm.org/D143051 (cherry picked from commit e685bde1)
-
Jonas Paulsson authored
- Global vector variables expose the vector ABI through their alignments only if they are >=16 bytes in size. - Vectors passed between functions expose the vector ABI only if they are <=16 bytes in size. LLVM test suite builds with gcc/clang now give the same gnu attributes emitted. Reviewed By: Ulrich Weigand Differential Revision: https://reviews.llvm.org/D141409 (cherry picked from commit 0eff46f8)
-
Jonathan Peyton authored
Do not check for version symbol support if the necessary linker flag is not supported. Differential Revision: https://reviews.llvm.org/D143200 (cherry picked from commit c32022ad)
-
Khem Raj authored
Pass -D_FILE_OFFSET_BITS=64 to compiler flags on 32bit glibc based systems. This will make sure that 64bit versions of LFS functions are used e.g. seek will behave same as lseek64. Also revert [1] partially because this added a cmake test to detect lseek64 but then forgot to pass the needed macro to actual compile, this test was incomplete too since libc implementations like musl has 64bit off_t by default on 32bit systems and does not bundle[2] -D_LARGEFILE64_SOURCE under -D_GNU_SOURCE like glibc, which means the compile now fails on musl because the cmake check passes but we do not have _LARGEFILE64_SOURCE defined. Using the *64 function was transitional anyways so use -D_FILE_OFFSET_BITS=64 instead [1] https://github.com/llvm/llvm-project/commit/8db7e5e4eed4c4e697dc3164f2c9351d8c3e942b [2] https://git.musl-libc.org/cgit/musl/commit/?id=25e6fee27f4a293728dd15b659170e7b9c7db9bc Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D139752 (cherry picked from commit 5cd55430)
-
Fangrui Song authored
(cherry picked from commit 003f2b37)
-
Mark de Wever authored
The patch 430b397f ("[libc++] Granularize <type_traits> includes in <iterator>") missed some exports in the modulemap with became apparent in the reverting commit 12cb1cb3. This fixes the issue by updating the modulemap. Note that the Clang ICE is not fixed by this change. Reviewed By: #libc, ldionne Differential Revision: https://reviews.llvm.org/D142690 (cherry picked from commit a7f8ddc4)
-
varconst authored
This is in anticipation of https://isocpp.org/files/papers/D2770R0.html, which is ABI-breaking for `join_view`. Differential Revision: https://reviews.llvm.org/D142520 (cherry picked from commit c2b3986e)
-
eopXD authored
Reviewed By: asb Differential Revision: https://reviews.llvm.org/D142094
-
eopXD authored
This commit adds prefix for the overloaded RVV intrinsics. This is the 3rd commit of a patch-set to add __riscv_ for all RVV intrinsics. This follows the naming guideline under riscv-c-api-doc to add the `__riscv_` suffix for all RVV intrinsics. Pull Request: riscv-non-isa/riscv-c-api-doc#31 riscv-non-isa/rvv-intrinsic-doc#189 Depends on D142644. Reviewed By: kito-cheng Differential Revision: https://reviews.llvm.org/D142697
-
eopXD authored
This commit adds prefix for the non-overloaded RVV intrinsics. This is the 2nd commit of a patch-set to add __riscv_ for all RVV intrinsics. This follows the naming guideline under riscv-c-api-doc to add the `__riscv_` suffix for all RVV intrinsics. Pull Request: riscv-non-isa/riscv-c-api-doc#31 riscv-non-isa/rvv-intrinsic-doc#189 Depends on D142085. Reviewed By: kito-cheng Differential Revision: https://reviews.llvm.org/D142644
-
eopXD authored
This commit adds prefix for intrinsics that are defined through `HeaderCode` under `riscv_vector.td`. This is the 1st commit of a patch-set to add `__riscv_` for all RVV intrinsics. This follows the naming guideline under riscv-c-api-doc to add the `__riscv_` suffix for all RVV intrinsics. Pull Request: riscv-non-isa/riscv-c-api-doc#31 riscv-non-isa/rvv-intrinsic-doc#189 Depends on D142016. Reviewed By: kito-cheng Differential Revision: https://reviews.llvm.org/D142085
-