- Jun 08, 2022
-
-
Vitaly Buka authored
-
Vitaly Buka authored
-
Mitch Phillips authored
-
Mitch Phillips authored
Extracted from D84652.
-
Christopher Bate authored
Reverts commit 1469ebf8 (original commit) Reverts commit a392a39f (build fix for above commit) The commit broke tests in out-of-tree projects, indicating that some logical error was made in the previous change but not covered by current tests.
-
Jason Molenda authored
On macOS, a process will be launched with /usr/lib/dyld (the dynamic linker) and the main binary by the kernel. The first thing the standalone dyld will do is call into the dyld in the shared cache image. This patch tracks the transition between the dyld's at the very beginning of process startup. In DynamicLoaderMacOS::NotifyBreakpointHit() there are two new cases handled: `dyld_image_dyld_moved` which is the launch /usr/lib/dyld indicating that it is about call into the shared cache dyld ane evict itself. lldb will remove the notification breakpoint it set, clear the binary image list entirely, get the notification function pointer value out of the dyld_all_image_infos struct (which is the notification fptr in the to-be-run shared-cache dyld) and put an address breakpoint there. `dyld_notify_adding` is then called by shared-cache dyld, and we detect this case by noticing that we have an empty binary image list, normally impossibe, and treating this as if we'd just started a process attach/launch. Differential Revision: https://reviews.llvm.org/D127247 rdar://84222158
-
Louis Dionne authored
The debug mode has been broken pretty much ever since it was shipped because it was possible to enable the debug mode in user code without actually enabling it in the dylib, leading to ODR violations that caused various kinds of failures. This commit makes the debug mode a knob that is configured when building the library and which can't be changed afterwards. This is less flexible for users, however it will actually work as intended and it will allow us, in the future, to add various kinds of checks that do not assume the same ABI as the normal library. Furthermore, this will make the debug mode more robust, which means that vendors might be more tempted to support it properly, which hasn't been the case with the current debug mode. This patch shouldn't break any user code, except folks who are building against a library that doesn't have the debug mode enabled and who try to enable the debug mode in their code. Such users will get a compile-time error explaining that this configuration isn't supported anymore. In the future, we should further increase the granularity of the debug mode checks so that we can cherry-pick which checks to enable, like we do for unspecified behavior randomization. Differential Revision: https://reviews.llvm.org/D122941
-
Philip Reames authored
c2eccc67 introduced a call to etHasNoUnsignedWrap which implicitly assumes that Inst is a OverflowingBinaryOperator. This is frequently untrue, but was not caught because cast<Ty>(X) has been broken, see https://discourse.llvm.org/t/cast-x-is-broken-implications-and-proposal-to-address/63033 for context. I considered reverting this, but since doing so re-introduces a nasty miscompile of its own, I decided to fix forward instead. I'll note that this is a particularly nasty form of the cast<Ty>(X) issue. Because the cast was succeeding unexpected, we were writing data to instructions which weren't OBOs. This could result in near arbitrary data or memory corruption. I'm a bit shocked that the sanitizers didn't find this TBH.
-
Philip Reames authored
This reverts commit 180d3f25. This commit is simply wrong. IsLoad is set within the same file based on modref state, not whether the instruction is a LoadInst. This went uncaught because cast<Ty>(X) has been broken. See https://discourse.llvm.org/t/cast-x-is-broken-implications-and-proposal-to-address/63033 for context.
-
Sunho Kim authored
The separate isLoadStoreImm12 predicate will be used for validating ELF/aarch64 ldst relocation types. Reviewed By: lhames, sgraenitz Differential Revision: https://reviews.llvm.org/D126628
-
Florian Hahn authored
This violation is hidden while `cast` is missing an isa assertion after D123901.
-
Joseph Huber authored
Summary: The OffloadingBinary uses a convenience struct to help manage the memory that will be serialized using the binary format. This currently uses a reference to an existing buffer, but this should own the memory instead so it is easier to work with seeing as its only current use requires saving the buffer anyway.
-
Joseph Huber authored
Summary: The OffloadBinary wraps around an embedded device image, commonly an ELF or LLVM BC file. These file formats have alignment requirements for parsing, so if the image is stored at an un-aligned offset from the beginning of the file we will be unable to parse the embeded image without copying the image buffer. This patch adds alignment padding before the binary image is appended to ensure we can parse the symbolic file it contains in-place without copying memory.
-
Aaron Ballman authored
This adds the papers for the Jun, Sep, and Dec 2021 meetings. 2022 papers will be handled in a follow-up.
-
Philip Reames authored
This reverts commit 0809f638. The patch appears not to have included corresponding isa<Ty> support. This was revealed when reintroducing the required isa<Ty> asserts in cast<Ty>. See https://discourse.llvm.org/t/cast-x-is-broken-implications-and-proposal-to-address/63033 for context. Here's the template instantiation error: In file included from /home/preames/llvm-repo/llvm-project/llvm/unittests/Support/Casting.cpp:9: /home/preames/llvm-repo/llvm-project/llvm/include/llvm/Support/Casting.h: In instantiation of ‘static bool llvm::isa_impl<To, From, Enabler>::doit(const From&) [with To = llvm::bar*; From = llvm::bar; Enabler = void]’: /home/preames/llvm-repo/llvm-project/llvm/include/llvm/Support/Casting.h:110:36: required from ‘static bool llvm::isa_impl_cl<To, const From*>::doit(const From*) [with To = llvm::bar*; From = llvm::bar]’ /home/preames/llvm-repo/llvm-project/llvm/include/llvm/Support/Casting.h:137:41: required from ‘static bool llvm::isa_impl_wrap<To, FromTy, FromTy>::doit(const FromTy&) [with To = llvm::bar*; FromTy = const llvm::bar*]’ /home/preames/llvm-repo/llvm-project/llvm/include/llvm/Support/Casting.h:129:13: required from ‘static bool llvm::isa_impl_wrap<To, From, SimpleFrom>::doit(const From&) [with To = llvm::bar*; From = const llvm::bar* const; SimpleFrom = const llvm::bar*]’ /home/preames/llvm-repo/llvm-project/llvm/include/llvm/Support/Casting.h:263:62: required from ‘static bool llvm::CastIsPossible<To, From, Enable>::isPossible(const From&) [with To = llvm::bar*; From = const llvm::bar*; Enable = void]’ /home/preames/llvm-repo/llvm-project/llvm/include/llvm/Support/Casting.h:517:38: required from ‘static bool llvm::CastInfo<To, From, typename std::enable_if<(! llvm::is_simple_type<From>::value), void>::type>::isPossible(From&) [with To = llvm::bar*; From = llvm::bar* const]’ /home/preames/llvm-repo/llvm-project/llvm/include/llvm/Support/Casting.h:556:46: required from ‘bool llvm::isa(const From&) [with To = llvm::bar*; From = llvm::bar*]’ /home/preames/llvm-repo/llvm-project/llvm/include/llvm/Support/Casting.h:585:3: required from ‘decltype(auto) llvm::cast(From*) [with To = llvm::bar*; From = llvm::bar]’ /home/preames/llvm-repo/llvm-project/llvm/unittests/Support/Casting.cpp:181:27: required from here /home/preames/llvm-repo/llvm-project/llvm/include/llvm/Support/Casting.h:64:64: error: ‘classof’ is not a member of ‘llvm::bar*’ 64 | static inline bool doit(const From &Val) { return To::classof(&Val); }
-
Martin Sebor authored
Enhance memchr libcall folder to handle constant arrays consisting of one or two sequences of cosecutive equal characters. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D126515
-
Martin Sebor authored
Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D126515
-
Sam Estep authored
Reviewed By: ymandel Differential Revision: https://reviews.llvm.org/D127008
-
Joe Nash authored
There was an issue with encoding wide (>64 bit) instructions on BigEndian hosts, which is fixed in D127195. Therefore reland this. gfx11 adds the ability to use dpp modifiers on vop3 instructions. This patch adds machine code layer support for that. The MCCodeEmitter is changed to use APInt instead of uint64_t to support these wider instructions. Patch 16/N for upstreaming of AMDGPU gfx11 architecture Differential Revision: https://reviews.llvm.org/D126483
-
Derek Schuff authored
There are 3 places where we were using WASM_SEC_TAG as the "last" known section type, which requires updating (or leaves a bug) when a new known section type is added. Instead add a "last type" to the enum for this purpose. Differential Revision: https://reviews.llvm.org/D127164
-
Sunho Kim authored
This patch moves the aarch64 fixup logic from the MachO/arm64 backend to aarch64.h header so that it can be re-used in the ELF/aarch64 backend. This significantly expands relocation support in the ELF/aarch64 backend. Reviewed By: lhames, sgraenitz Differential Revision: https://reviews.llvm.org/D126286
-
William Huang authored
[ValueTracking] Add support to deduce a PHI node being a power of 2 if each incoming value is a power of 2. Reviewed By: davidxl Differential Revision: https://reviews.llvm.org/D124889
-
Reid Kleckner authored
This has been superseded by the llvm/Support/VCSRevision.h header. So far as I can tell, nothing in the CMake build sets LLVM_VERSION_INFO. It was always undefined, and the ifdefs using it were dead. However, CMake is very flexible, so it's possible that I missed some ways to set this variable. One could, for example, probably pass -DLLVM_VERSION_INFO=x on the command line and get that through to configure_file, or set the variable in an obscure way (`set(${proj}_VERSION_INFO "x")`). I'm reasonably confident that isn't happening, but I'd like a second opinion. Update the Bazel and gn builds accordingly. Differential Revision: https://reviews.llvm.org/D126977 -
Reid Kleckner authored
This doesn't need to be configurable. It was hardcoded to void in all LLVM build systems.
-
Erich Keane authored
Originally broken by me in D122608, this is a regression where we attempt to replace an extern-C thing with 'itself'. The problem is that we end up deleting it, causing the value to fail when it gets put into llvm.used.
-
Philip Reames authored
The test being change appears to have been intended to exercise PointerUnion, but what it actually did was cast<> a double to a double*. This only worked because cast<> was missing the required assertion. Adding the assertion reveals a template error where isa<const double*>(double) fails to compile.
-
Kaining Zhong authored
Directly using StringLiteral::getString for wide string is not currently supported; therefore in ASTDiff, getStmtValue will fail when asserting that the StringLiteral has a width of 1. This patch also covers cases for UTF16 and UTF32 encoding, along with corresponding test cases. Fixes https://github.com/llvm/llvm-project/issues/55771. Reviewed By: johannes Differential Revision: https://reviews.llvm.org/D126651
-
Jay Foad authored
For instructions wider than 64 bits the InstBits table is initialized in 64-bit chunks from APInt::getRawData, but it was being read with LoadIntFromMemory which is byte-based. Fix this by reading the table with the APInt constructor that takes an ArrayRef to the raw data instead. This is currently NFC for in-tree targets but fixes AMDGPU failures on big-endian hosts that were caused by D126483 until it was reverted. Differential Revision: https://reviews.llvm.org/D127195
-
David Green authored
isDef32 would attempt to make a guess at which SelectionDag nodes were 32bit sources, and use the nature of 32bit AArch64 instructions implicitly zeroing the upper register half to not emit zext that were expected to already be zero. This was a bit fragile though, needing to guess at the correct opcodes that do not become 32bit defs later in ISel. This patch removed isDef32, relying on the AArch64MIPeephole optimizer to remove redundant SUBREG_TO_REG nodes. A part of SelectArithExtendedRegister was left with the same logic as a heuristic to prevent some regressions from it picking less optimal sequences. The AArch64MIPeepholeOpt pass also needs to be taught that a COPY from a FPR will become a FMOVSWr, which it lowers immediately to make sure that remains true through register allocation. Fixes #55833 Differential Revision: https://reviews.llvm.org/D127154
-
Vince Bridgers authored
A crash was seen in CastValueChecker due to a null pointer dereference. The fix uses QualType::getAsString to avoid the null dereference when a CXXRecordDecl cannot be obtained. A small reproducer is added, and cast value notes LITs are updated for the new debug messages. Reviewed By: steakhal Differential Revision: https://reviews.llvm.org/D127105
-
Sanjay Patel authored
If we don't demand high bits (zeros) and it is valid to pre-shift a constant: (C2 << X) >> C1 --> (C2 >> C1) << X https://alive2.llvm.org/ce/z/P3dWDW There are a variety of related patterns, but I haven't found a single solution that gets all of the motivating examples - so pulling this piece out of D126617 along with more tests. We should also handle the case where we shift-right followed by shift-left, but I'll make that a follow-on patch assuming this one is ok. It seems likely that we would want to add this to the SDAG version of the code too to keep it on par with IR. Differential Revision: https://reviews.llvm.org/D127122
-
Sanjay Patel authored
D127122
-
Groverkss authored
This patch fixes a bug in PresburgeRelation::subtract that made it process the inequality at index 0, multiple times. This was caused by allocating memory instead of reserving memory in llvm::SmallVector. Reviewed By: arjunp Differential Revision: https://reviews.llvm.org/D127228
-
Alan Zhao authored
After D126425 was submitted, hans@ observed that MSVC's ml.exe doesn't care about the file's extension at all. Now, we check if the file exists to determine whether an input filename is a valid assembly file. To keep things consistent with clang-cl and lld-link, llvm-ml will treat everything that's not a flag as a filename. Reviewed By: hans Differential Revision: https://reviews.llvm.org/D126931
-
Mark de Wever authored
After moving the std::to_chars base 10 implementation from the dylib to the header the integral overloads of std::to_chars are available on all platforms. Remove the _LIBCPP_AVAILABILITY_TO_CHARS availability macro and update the tests. Depends on D125704 Reviewed By: ldionne, #libc Differential Revision: https://reviews.llvm.org/D125745
-
Philip Reames authored
Once extended with a case which requires duplication, will serve as test for crash being fixed in D127131.
-
Mark de Wever authored
- Updates the image to use Ubuntu Jammy. - Installs GCC-12 as preparation to migrate to that GCC version. Reviewed By: ldionne, #libc, jloser Differential Revision: https://reviews.llvm.org/D126666
-
Mark de Wever authored
This was noticed in the review of D125704. In that commit only the new table has been adapted. This adapts the existing tables. Note since libc++'s charconv is backported to C++11 it's not possible to use inline constexpr variables. The were introduced in C++17. Reviewed By: #libc, ldionne Differential Revision: https://reviews.llvm.org/D126887
-
David Penry authored
Just a few spelling mistakes and missing newlines Reviewed By: dmgreen Differential Revision: https://reviews.llvm.org/D127162
-
Benjamin Kramer authored
parseBlock may decide to leave it unchanged. Found by msan.
-