- Apr 28, 2023
-
-
Jordan Rupprecht authored
Revert "[CodeGenPrepare] Estimate liveness of loop invariants when checking for address folding profitability" This reverts commit 5344d8e1. It causes non-determinism when building clang. See the review thread on D143897.
-
Shao-Ce SUN authored
Add --undefined=_QQmain to the link line, so that a Fortran main program will be included in the link job even if it is in an archive (unless we are building a shared object). For now, this is only applied to the Gnu toolchain. We also add a section on the linker invocation to docs/FlangDriver.md. The new tests require llvm-ar to construct an archive we can include in the link job. This is a new dependency for flang/test (which already depends on similar tools such as llvm-objdump). See discussions in https://github.com/llvm/llvm-project/issues/54787 which this patch fixes. Reviewed By: awarzynski Differential Revision: https://reviews.llvm.org/D134821
-
Joseph Huber authored
This patch implements the `exit` function on the GPU. This required breaking the entrypoints calling eachother on `linux` since this doesn't work with a non-aliased target. This is only partial support because full support requires a malloc / free implementation for the exit callbacks array. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D149363
-
Joseph Huber authored
This patch simply enables building the integer `abs` functions for the GPU. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D149317
-
Joseph Huber authored
This patch enables us to use the existing `libc` support for string conversion functions on the GPU. This required setting the `fenv_t` and long double configuration. As far as I am aware, long doubles are converted to doubles on the GPU and the floating point environment is just an `uint32_t`. This code is still untested as we are still working out how to run the unit tests on the GPU. Reviewed By: michaelrj Differential Revision: https://reviews.llvm.org/D149306
-
Eric Fiselier authored
Committing on behalf of davidben. Reviewed as D146190 Patch originally by Jan Dörrie in https://reviews.llvm.org/D120064. I've just updated it to include tests, and update documentation that MSVC ABI is not stable. In the current implementation both `std::optional` and `std::variant` don't perform the EBO on MSVC's ABI. This is because both classes inherit from multiple empty base classes, which breaks the EBO for MSVC. This patch fixes this issue by applying the `empty_bases` declspec attribute, which is already used to fix a similar issue for `std::tuple`. See https://reviews.llvm.org/D120064 for discussion on MSVC ABI stability. From the discussion, libc++ doesn't have users that expect a stable ABI on MSVC. The fix is thus applied unconditionally to benefit more users. Documentation has been updated to reflect this. Fixes https://github.com/llvm/llvm-project/issues/61095.
-
Jim Ingham authored
This was using `struct data` which is way to common a name to use in an lldb expression, and was causing occasional failures in the TSan report gatherer. The structure doesn't need to have a tag, so remove it to avoid future problems. The same job was done for the other sanitizers in D145569, but this one was overlooked. Differential Revision: https://reviews.llvm.org/D149394
-
Alexey Bataev authored
-
Wu, Yingcong authored
`x_aliases` is an array of string, so to calculate its size, it should be <size-of-array> times <size-of-element>, which should be `sizeof(char*)` instead of `sizeof(char**)`. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D149242
-
Jacob Hegna authored
-
Jeffrey Byrnes authored
Even if optimizing for ILP, it is still useful to track RP to avoid spilling. Given that, we need to maintin consistent liveness state with the RP tracker. This patch makes RP tracking consistent by updating for liveins. Otherwise, we should completely eliminate RP tracking for this scheduler (checkScheduling, initCandidate). Differential Revision: https://reviews.llvm.org/D149358
-
Alexander Shaposhnikov authored
This commit adds FIXME and a temporary workaround to repair CUDA build bots after e3b1083e.
-
Thurston Dang authored
This adds the sanitizer_common syscall hooks to HWASan and also defines the COMMON_SYSCALL_PRE_{READ/WRITE}_RANGE macros. Differential Revision: https://reviews.llvm.org/D149386 -
Jacob Hegna authored
This aligns the inlining macros more closely with how the regalloc macros are defined. - Explicitly specify the dtype/shape - Remove separate names for python/C++ - Add docstring for inline cost features Differential Revision: https://reviews.llvm.org/D149384
-
Manoj Gupta authored
Use correct internal sve functions for arm64. Otherwise, when cross-compling lld for AArch64 there are build errors like: NativeRegisterContextLinux_arm64.cpp:936:11: error: use of undeclared identifier 'sve_vl_valid NativeRegisterContextLinux_arm64.cpp:63:28: error: variable has incomplete type 'struct user_sve_header' Reviewed By: omjavaid Differential Revision: https://reviews.llvm.org/D148752 -
Jessica Paquette authored
When a user uses a mismatched clang + llvm-profdata, they didn't get a very informative error message. It would just say "unsupported version". As a result, users are often confused as to what they are supposed to do and tend to assume that it's a bug in the profiling runtime. This patch improves the error message by: - Adding a new class of error (`raw_profile_version_mismatch`) to make it clear that, specifically, the *raw profile* version is unsupported because of a tool mismatch. - Adding an error message that tells the user which raw profile version was encountered, which version was expected, and instructs them to align their tool versions. To support this, this patch also updates `InstrProfError::take` to also propagate the optional error message. Differential Revision: https://reviews.llvm.org/D149361
-
Caslyn Tonelli authored
Signal handlers used by recoverable tests are unsupported on Fuchsia. Exclude the set of tests that test recoverable code paths (i.e. BacktraceGuardedPoolAllocator tests in recoverable.cpp) and always set the `Recoverable` testing bool to `false` on the Fuchsia platform. Differential Revision: https://reviews.llvm.org/D149311
-
Alexander Shaposhnikov authored
This diff switches the approach to comparison of constraint expressions to the new one based on template args substitution. It continues the effort to fix our handling of out-of-line definitions of constrained templates. This is a recommit of 60bee9ff. Differential revision: https://reviews.llvm.org/D146178
-
Tom Honermann authored
This change expands testing of UTF-8, UTF-16, and UTF-32 character and string literals as validation that WG14 N2728 (char16_t & char32_t string literals shall be UTF-16 & UTF-32) has been implemented. Reviewed By: cor3ntin, aaron.ballman Differential Revision: https://reviews.llvm.org/D149098
-
Roland McGrath authored
https://github.com/llvm/llvm-project/issues/62396 reports that GCC 13 barfs on parsing <type_traits> because of the declarations of `struct __is_convertible`. In GCC 13, `__is_convertible` is a built-in, but `__is_convertible_to` is not. Clang has both, so using either should be fine. Reviewed By: #libc, philnik Differential Revision: https://reviews.llvm.org/D149313
-
Paul Kirth authored
Previously we only accepted the `-fdiagnostics-misexpect-tolerance=` at CC1, when it should have been handled identically to `-fdiagnostics-hotness-threshold=`. It should not have been required to pass this flag w/ `-Xclang` as reported here: https://reviews.llvm.org/D115907#inline-1440745 Reviewed By: hans, phosek Differential Revision: https://reviews.llvm.org/D149206
-
Nick Desaulniers authored
If the removable definition resides in an INLINEASM_BR target, the reuseable candidate might not dominate the INLINEASM_BR. bb0: INLINEASM_BR &"" %bb.1 renamable $x8 = MOVi64imm 29273397577910035 B %bb.2 ... bb1: renamable $x8 = MOVi64imm 29273397577910035 renamable $x8 = ADDXri killed renamable $x8, 2048, 0 bb2: Removing the second mov is a hazard when the inline asm branches to bb1. Skip such replacements when the to be removed instruction is in the target of such an INLINEASM_BR instruction. We could get more aggressive about this in the future, but for now simply abort. This is causing a boot failure on linux-4.19.y branches of the LTS Linux kernel for ARCH=arm64 with CONFIG_RANDOMIZE_BASE=y (KASLR) and CONFIG_UNMAP_KERNEL_AT_EL0=y (KPTI). Link: https://reviews.llvm.org/D123394 Link: https://github.com/ClangBuiltLinux/linux/issues/1837 Thanks to @nathanchance for the report, and @ardb for debugging. Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D149191 -
Nick Desaulniers authored
Demonstrates a hazard in machine-latecleanup. Differential Revision: https://reviews.llvm.org/D149190
-
LLVM GN Syncbot authored
-
Nikolas Klauser authored
Reviewed By: ldionne, #libc Spies: sstefan1, pcwang-thead, jplehr, libcxx-commits, arichardson, mgrang, miyuki Differential Revision: https://reviews.llvm.org/D149275
-
Mingming Liu authored
callsites when none of the instructions folds the rest away. - Merge cases are added for simplify-cfg {sink,hoist}, based on https://gcc.godbolt.org/z/avGvc38W7 and https://gcc.godbolt.org/z/dbWbjGhaE - When one instruction folds the others in, do not update branch_weights with sum (see test/Transforms/GVN/calls-readonly.ll) Differential Revision: https://reviews.llvm.org/D148877 -
Andrew Gozillon authored
This patch seeks to do two things add an accessor method to retrieve the ModuleTranslations contained LLVM Module for direct usage by dialects that are being lowered to LLVM-IR. One particular use case for this is in the OpenMP Dialect, when interfacing with the OMPIRBuilder in certain cases it is useful to be able to access the LLVM Module directly. The second is invoking convertDialectAttributes on GlobalOp's so as to be able to lower dialect specific attributes that are applied or lowered onto GlobalOp's. Reviewers: ftynse Differential Revision: https://reviews.llvm.org/D149279
-
Christian Ulmann authored
This commit fixes a dead StringRef access introduced in https://reviews.llvm.org/D149324
-
Joseph Huber authored
Summary: This patch adds a way to get the total number of blocks and implement the wave sync intrinsic for AMDGPU. This is a no-op, but that may change in the future so we might as well implement it right.
-
Mircea Trofin authored
This makes the logic for referenced globals reusable for import criteria that don't use thresholds - in fact, we currently didn't consider any thresholds when importing. Differential Revision: https://reviews.llvm.org/D149298
-
Snehasish Kumar authored
Symbolization of position independent code was added in D146181. Update the comment to note that the checks below are to sanity check the assumptions we make to simplify symbolization. Differential Revision: https://reviews.llvm.org/D149370
-
Slava Zakharin authored
c_ptr arguments passed by value need special handling, which was missing in HLFIR lowering. The lowering has to load the __address component and pass the loaded value as the actual argument. Differential Revision: https://reviews.llvm.org/D149307
-
Noah Goldstein authored
Alive2 Link: https://alive2.llvm.org/ce/z/2DKh46 Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D149203 -
Arthur Eubanks authored
This reverts commit ca94b02e. Causes miscompiles, see D141188
-
Alan Zhao authored
-
Craig Topper authored
This was removed by D149314.
-
Jonathon Penix authored
This fixes an error that clang_target_link_libraries is unknown when building the Decimal library standalone--this is the same as D149090, just for the Decimal library (vs the runtime). I was still seeing this error for the Decimal library and didn't see a corresponding patch--apologies in advance if I missed one or if this is a duplicate! Differential Revision: https://reviews.llvm.org/D149277
-
Alexey Bataev authored
instead, NFC. Better to use PointerUnion<Value *, const TreeEntry *> instead of extra attempts of creating null vector values, where possible.
-
Changpeng Fang authored
Summary: Registers for tail call return should not be clobbered by callee. So we need a sub-class of SGPR_64 (excluding callee saved registers (CSR)) to hold the tail call return address. Because GFX and C calling conventions have different CSR, we need to define the sub-class separately. This work is an extension of D147096 with the consideration of GFX calling convention. Based on the calling conventions, different instructions will be selected with different sub-class of SGPR_64 as the input. Reviewers: arsenm, cdevadas and sebastian-ne Differential Revision: https://reviews.llvm.org/D148824
-
Elliot Goodrich authored
The multiple-include optimization allows Clang to avoid opening a files when they contain #pragma once or a proper include guard. Both GCC and Microsoft Visual Studio allow null directives outside of the #ifndef/#endif pair without disabling this multiple-include optimization. GCC documents this behavior here https://gcc.gnu.org/onlinedocs/cppinternals/Guard-Macros.html. > There must be no directives outside the controlling directive pair, > but the null directive (a line containing nothing other than a > single '#' and possibly whitespace) is permitted. However, Clang disables the multiple-include optimization when encountering the null directive. In particular, this slows down preprocessing of most projects that depend on boost as many boost libraries depend on the boost preprocessor library, which contains null directives outside the include guard on every header file. Differential Revision: https://reviews.llvm.org/D147928
-