Age | Commit message (Collapse) | Author | Files | Lines |
|
LLVM_ENABLE_ABI_BREAKING_CHECKS
This patch fixes the error llvm/lib/CodeGen/MachineScheduler.cpp(755): error C2065: 'MISchedCutoff': undeclared identifier in case of NDEBUG and LLVM_ENABLE_ABI_BREAKING_CHECKS.
Note MISchedCutoff is declared under #ifndef NDEBUG.
Reviewed By: RKSimon
Differential Revision: https://reviews.llvm.org/D130425
(cherry picked from commit adc387460d85a371d111bcd3e08fdc8d4f26ddd5)
|
|
Macros that expand into multiple terms can cause interesting preprocessor hickups depending
on the context they are used in. https://github.com/llvm/llvm-project/issues/56867 reported
a miscompilation of `llvm_unreachable(msg)` inside a `LLVM_DEBUG({ ... })` block. We were
able to fix it by wrapping the expansion in a `do {} while(false)`.
Differential Revision: https://reviews.llvm.org/D131337
(cherry picked from commit 7a66fe1075cfc7568554aeea9c40997dfb581979)
|
|
Previously we only supporting using the system pointer size (aka the
`absptr` encoding) because `llvm-mc`'s CFI directives always generate EH
frames with that encoding. But libffi uses 4-byte-encoded, hand-rolled
EH frames, so this patch adds support for it.
Fixes #56576.
Reviewed By: #lld-macho, oontvoo
Differential Revision: https://reviews.llvm.org/D130804
(cherry picked from commit 6c9f6812523a706c11a12e6cb4119b0cf67bbb21)
|
|
When back-deploying to older platforms, we can still provide assertions,
but we might not be able to provide a great implementation for the verbose
handler. Instead, we can just call ::abort().
Differential Revision: https://reviews.llvm.org/D131199
(cherry picked from commit e36f9e13bca41223bd6af7e49bf020e58a676e9d)
|
|
The newly-completed papers:
- P0896R4 ("The One Ranges Proposal");
- P1243R4 ("Rangify New Algorithms");
- P1252R2 ("Ranges Design Cleanup");
- P1716R3 ("Range Comparison Algorithms Are Over-Constrained");
- P1871R1 ("Concept traits should be named after concepts");
- P2106R0 ("Alternative wording for GB315 and GB316").
Differential Revision: https://reviews.llvm.org/D131234
(cherry picked from commit 3fa291fa925dad4bae215fbcbc64db5ce66f0d9f)
|
|
"robust" tests.
Also fix `std::find_first_of` (which accidentally copied the predicate
in the implementation).
Differential Revision: https://reviews.llvm.org/D131235
(cherry picked from commit 8ac015caf627a0db89540950d6343e955ba9500b)
|
|
This partially reverts commit 7d855bb8e133. The comments were actually
not outdated, they were simply unclear.
(cherry picked from commit cf08452e918e04c5a95b6dce11a977b317ac4476)
|
|
(cherry picked from commit 7d855bb8e133720ac1555dc189d9f41e7a50ea93)
|
|
Evaluating `contiguous_iterator` on an iterator that satisfies all the
constraints except the `to_address` constraint and doesn't have
`operator->` defined results in a hard error. This is because
instantiating `to_address` ends up instantiating templates
dependent on the given type which might lead to a hard error even
in a SFINAE context.
Differential Revision: https://reviews.llvm.org/D130835
(cherry picked from commit 52d4c5016c4f8eca6abe84f658fc5f358bdfd2d0)
|
|
Co-authored-by: Konstantin Varlamov <varconst@apple.com>
Differential Revision: https://reviews.llvm.org/D127194
(cherry picked from commit 4038c859e58c12e997041927a87e880f2f3ef883)
|
|
I found it in this commit: https://github.com/llvm/llvm-project/commit/a203acb9dd7227323d6161431225189d49917744
Reviewed By: Mordante
Differential Revision: https://reviews.llvm.org/D131163
(cherry picked from commit 1915c1c01e6c84a1fda5a313f85e2a3dbccd7ce0)
|
|
Differential Revision: https://reviews.llvm.org/D126193
(cherry picked from commit a203acb9dd7227323d6161431225189d49917744)
|
|
Also fix `ranges::stable_sort` and `ranges::inplace_merge` to support
proxy iterators now that their internal implementations can correctly
dispatch `rotate`.
Differential Revision: https://reviews.llvm.org/D130758
(cherry picked from commit 36c746ca2d5b325a7ac64135c1ff8774c06ab34c)
|
|
(cherry picked from commit 144cea2ce9b9536acaf2a7513b9fdccfd3880db9)
|
|
These are new debug types that ships with the latest
Windows SDK and would warn and finally fail lld-link.
The symbols seems to be related to Microsoft's XFG
which is their version of CFG. We can't handle any of
this yet, so for now we can just ignore these types
so that lld doesn't fail with a new version of Windows
SDK.
Fixes: #56285
Reviewed By: rnk
Differential Revision: https://reviews.llvm.org/D129378
(cherry picked from commit 576375a2d670a7b1bd84b53b0187605a5f4ea0c8)
|
|
As mentioned in https://reviews.llvm.org/D121379#3690593, this
change broke the build of compiler-rt targeting powerpc using GCC.
The 32-bit powerpc target is not supposed to emit 128-bit libcalls
-- if it does, then that's a backend bug and needs to be fixed there.
This reverts commit 8f24a56a3a9363f353c8da318d97491a6818781d.
Differential Revision: https://reviews.llvm.org/D130988
(cherry picked from commit 542977d43841820614a32823c33415042430e230)
|
|
D74537 introduced a bug: if `(config->andFeatures & GNU_PROPERTY_AARCH64_FEATURE_1_PAC) != 0`
with -z pac-plt unspecified, we incorrectly use AArch64BtiPac, whose writePlt will make
out-of-bounds write after the .plt section. This is often benign because the
output section after .plt will usually overwrite the content.
This is very difficult to test without D131247 (Parallelize writes of different OutputSections).
(cherry picked from commit d7cbfcf36ace575ec90434624279dd3ebce78c47)
|
|
The place from D61712 seems unneeded now. We can just use the place added by
D62609 (support AArch64 BTI/PAC).
(cherry picked from commit e89d6d2ac527f973c43563373dfdeb9e4c3bbcc5)
|
|
D91426 makes .got possibly empty while needed. If .got and .data have the same
address, and .got's content is written after .data, the first word of .data will
be corrupted.
The bug is not testable without D131247.
(cherry picked from commit 28d05d672300e51f53c73fe9a4bd053e73844247)
|
|
Some tests (e.g. aarch64-feature-pac.s) segfault in libstdc++ _GLIBCXX_DEBUG
builds (enabled by LLVM_ENABLE_EXPENSIVE_CHECKS).
dyn_cast<ThunkSection> is incorrectly true for any SyntheticSection. std::merge
transitively calls mergeCmp(x, x) (due to __glibcxx_requires_irreflexive_pred)
and will segfault in `ta->getTargetInputSection()`. The dyn_cast<ThunkSection>
issue should be eventually fixed properly, bug `a != b` is robust enough for now.
(cherry picked from commit abd9807590fc10eb92eb22aea7b50dbf08db7e9d)
|
|
Fixes https://github.com/llvm/llvm-project/issues/56960
Differential Revision: https://reviews.llvm.org/D131288
(cherry picked from commit 9ec4ddd224f400e2ec309fa513904525c059cc1e)
|
|
In https://github.com/llvm/llvm-project/commit/6e566bc5523f743bc34a7e26f050f1f2b4d699a8, The directory structure of the documentation for clang-tidy checks was changed, however clangd wasn't updated.
Now all the links generated will point to old dead pages.
This updated clangd to use the new page structure.
Reviewed By: sammccall, kadircet
Differential Revision: https://reviews.llvm.org/D128379
(cherry picked from commit 4c106c93eb68f8f9f201202677cd31e326c16823)
|
|
Given a poison constant as input, the dyn_cast to a ConstantInt would
fail so we would fall through to the generic code that attempts to fold
each element of the input vectors. The inputs to these intrinsics are
not vectors though, leading to a compile time crash. Instead bail out
properly for poison values by returning nullptr. This doesn't try to
define what poison means for these intrinsics.
Fixes #56945
(cherry picked from commit b2de84633a0a262b894e7cf87d29b167787aa2d6)
|
|
This fixes warnings like these:
../lib/ExecutionEngine/Orc/MemoryMapper.cpp:364:9: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
joinErrors(std::move(Err),
^~~~~~~~~~ ~~~~~~~~~~~~~~~
Differential Revision: https://reviews.llvm.org/D131056
(cherry picked from commit 46bc1b5689e417d870c57a8d16044a55549673fa)
|
|
Differential Revision: https://reviews.llvm.org/D131055
(cherry picked from commit 46196db4d305267a5d53ee642debaf408b0821a9)
|
|
Using if (TARGET ${LLVM_NATIVE_ARCH}) only works if MLIR is built
together with LLVM, but not for standalone builds of MLIR. The
correct way to check this is
if (${LLVM_NATIVE_ARCH} IN_LIST LLVM_TARGETS_TO_BUILD), as the
LLVM build system exports LLVM_TARGETS_TO_BUILD.
To avoid repeating the same check many times, add a
MLIR_ENABLE_EXECUTION_ENGINE variable.
Differential Revision: https://reviews.llvm.org/D131071
(cherry picked from commit 57a9bccec7dea036dbfa1a78f1ec5e73ecf7a33c)
|
|
Add a reference to llvm_orc_registerJITLoaderGDBAllocAction from the
linkComponents function in the lli, llvm-jitlink, and llvm-jitlink-executor
tools. This ensures that llvm_orc_registerJITLoaderGDBAllocAction is not
dead-stripped in optimized builds, which may cause failures in these tools.
The llvm_orc_registerJITLoaderGDBAllocAction function was originally added with
MachO debugging support in 69be352a1961a, but that patch failed to update the
linkComponents functions.
http://llvm.org/PR56817
(cherry picked from commit b5f76d83ff8b57b2a6e4897beb388837803643da)
|
|
shm_open and shm_unlink are not available on Android. This commit
disables SharedMemoryMapper on Android until a better solution is
available.
https://android.googlesource.com/platform/bionic/+/refs/heads/master/docs/status.md
https://github.com/llvm/llvm-project/issues/56812
Differential Revision: https://reviews.llvm.org/D130814
(cherry picked from commit ac3cb4ecd0c6ed03c135945d27bbe197d80cba4e)
|
|
We can't guarantee the long always 64 bits like WINDOWS or LLP64 data
model (rare but we should consider).
So use int64_t from inttypes.h and safe in this case.
Fixes https://github.com/llvm/llvm-project/issues/55911 .
(cherry picked from commit f38ea84a9f32058f3c2813b6f29b840c59de118c)
|
|
Previously when we add module initializer, we forget to handle header
units. This results that we couldn't compile a Hello World Example with
Header Units. This patch tries to fix this.
Reviewed By: iains
Differential Revision: https://reviews.llvm.org/D130871
(cherry picked from commit 6d10733d445506c02ebec9faa54658431857bb49)
|
|
According to [basic.def.odr]p14, the same redeclarations in different TU
but not attached to a named module are allowed. But we didn't take care
of concept decl for this condition. This patch tries to fix this
problem.
Reviewed By: ilya-biryukov
Differention Revision: https://reviews.llvm.org/D130614
(cherry picked from commit 4d9251bd780d20eebbcb124608b36a69787d5575)
|
|
Otherwise we get invalid results for ODR checks. See changed test for an
example: despite the fact that we merge the first concept, its **uses**
were considered different by `Profile`, leading to redefinition errors.
After this change, canonical decl for a concept can come from a
different module and may not be visible. This behavior looks suspicious,
but does not break any tests. We might want to add a mechanism to make
the canonical concept declaration visible if we find code that relies on
this invariant.
Additionally make sure we always merge with the canonical declaration to
avoid chains of merged concepts being reported as redefinitions. An
example was added to the test.
Also change the order of includes in the test. Importing a moduralized
header before its textual part causes the include guard macro to be
exported and the corresponding `#include` becomes a no-op.
Reviewed By: ChuanqiXu
Differential Revision: https://reviews.llvm.org/D130585
(cherry picked from commit 42f87bb62d0719848842da60d2a8180b9e4d7c52)
|
|
A previous patch made the destruction of the HSA plugin more
deterministic. However, there were still other global values that are not
handled this way. When attempting to call a destructor kernel, the
device would have already been uninitialized and we could not find the
appropriate kernel to call. This is because they were stored in global
containers that had their destructors called already. Merges this global
state into the rest of the info state by putting those global values
inside of the global pointer already allocated and deallocated by the
constructor and destructor. This should allow the AMDGPU plugin to
correctly identify the destructors if we were to run them.
Reviewed By: JonChesterfield
Differential Revision: https://reviews.llvm.org/D131011
(cherry picked from commit 2b7203a35972e98b8521f92d2791043dc539ae88)
|
|
Moves DeviceInfo global to heap to accurately control lifetime.
Moves calls from libomptarget to deinit_plugin later, plugins need to stay
alive until very shortly before libomptarget is destructed.
Leaving the deinit_plugin calls where initially inserted hits use after
free from the dynamic_module.c offloading test (verified with valgrind
that the new location is sound with respect to this)
Reviewed By: tianshilei1992
Differential Revision: https://reviews.llvm.org/D130714
(cherry picked from commit ed0f21811544320f829124efbb6a38ee12eb9155)
|
|
(cherry picked from commit c214cb6a689581c1b7f3b702b5da6d68de6eaf3f)
|
|
D130712
(cherry picked from commit 75aa52106452a1d15ca487af7b408a812012e133)
|
|
Will allow plugins to migrate away from using global variables to
manage lifetime, which will fix a segfault discovered in relation to D127432
Reviewed By: jhuber6
Differential Revision: https://reviews.llvm.org/D130712
(cherry picked from commit 1f9d3974e444f95ddb600a6964ed14ded559e89c)
|
|
As reported in Issue #56850, mlir/lib/Analysis/Presburger/Utils.cpp doesn't
compile on Solaris 11.4/SPARC with the bundled GCC 11, as seen when testing
LLVM 15.0.0 rc1:
/var/llvm/reltest/llvm-15.0.0-rc1/rc1/llvm-project/mlir/include/mlir/Analysis/Presburger/MPInt.h:260:47:
error: inlining failed in call to ‘always_inline’ ‘int64_t
mlir::presburger::int64FromMPInt(const mlir::presburger::MPInt&)’: indirect
function call with a yet undetermined callee
This patch hacks around this and allowed the build to finish.
Tested on `sparcv9-sun-solaris2.11`.
Differential Revision: https://reviews.llvm.org/D131060
(cherry picked from commit 75747e6e11aed9ed75d27527e9262cedb2e3f887)
|
|
Closing https://github.com/llvm/llvm-project/issues/56803. The root
cause for this bug is that we lack a good method to detect the language
mdoe when parsing the command line. There is a FIXME too. Dut to we lack
a good solution now, keep the workaround.
(cherry picked from commit 834a878367f549c58313200ce2c3a0da1a29d842)
|
|
This reverts commit 5fb41342105700949c81f68aefc85d9c46e9a1a6.
This patch is causing crashes when building llvm-test-suite when
optimizing for CPUs with AVX512.
Reproducer crashing with llc:
target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx"
define i32 @test(<32 x i32> %0) #0 {
entry:
%1 = mul <32 x i32> %0, <i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1>
%2 = tail call i32 @llvm.vector.reduce.add.v32i32(<32 x i32> %1)
ret i32 %2
}
; Function Attrs: nocallback nofree nosync nounwind readnone willreturn
declare i32 @llvm.vector.reduce.add.v32i32(<32 x i32>) #1
attributes #0 = { "min-legal-vector-width"="0" "target-cpu"="skylake-avx512" }
attributes #1 = { nocallback nofree nosync nounwind readnone willreturn }
(cherry picked from commit f912bab111add1275fcaf5f24e4d3654127972d0)
|
|
This fixes the following warnings produced by GCC 9:
../tools/lld/MachO/Arch/ARM64.cpp: In member function ‘void {anonymous}::OptimizationHintContext::applyAdrpLdr(const lld::macho::OptimizationHint&)’:
../tools/lld/MachO/Arch/ARM64.cpp:448:18: warning: comparison of integer expressions of different signedness: ‘int64_t’ {aka ‘long int’} and ‘uint64_t’ {aka ‘long unsigned int’} [-Wsign-compare]
448 | if (ldr.offset != (rel1->referentVA & 0xfff))
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../tools/lld/MachO/UnwindInfoSection.cpp: In function ‘bool canFoldEncoding(compact_unwind_encoding_t)’:
../tools/lld/MachO/UnwindInfoSection.cpp:404:44: warning: comparison between ‘enum<unnamed>’ and ‘enum<unnamed>’ [-Wenum-compare]
404 | static_assert(UNWIND_X86_64_MODE_MASK == UNWIND_X86_MODE_MASK, "");
| ^~~~~~~~~~~~~~~~~~~~
../tools/lld/MachO/UnwindInfoSection.cpp:405:49: warning: comparison between ‘enum<unnamed>’ and ‘enum<unnamed>’ [-Wenum-compare]
405 | static_assert(UNWIND_X86_64_MODE_STACK_IND == UNWIND_X86_MODE_STACK_IND, "");
| ^~~~~~~~~~~~~~~~~~~~~~~~~
Differential Revision: https://reviews.llvm.org/D130970
(cherry picked from commit 59c6f418fa3c5d6f5c8b75ebd817be8113de7931)
|
|
switch. NFC.
(cherry picked from commit b7c5683fac3de2f3349d57b9e133ac53204b1148)
|
|
D129980 converts (seteq (i64 (and X, 0xffffffff)), C1) into
(seteq (i64 (sext_inreg X, i32)), C1). If bit 31 of X is 0, it
will be turned back into an 'and' by SimplifyDemandedBits which
can cause an infinite loop.
To prevent this, check if bit 31 is 0 with computeKnownBits before
doing the transformation.
Fixes PR56905.
Reviewed By: reames
Differential Revision: https://reviews.llvm.org/D131113
(cherry picked from commit 53d560b22f5b5d91ae5296f030e0ca75a5d2c625)
|
|
Reviewed By: asb
Differential Revision: https://reviews.llvm.org/D130687
(cherry picked from commit e208bab55fb11a69931a02dec8583a8ec5f94bbf)
|
|
Trying to be generic didn't work properly because we had to special-case
some interface libraries that we didn't want in the linker script. Instead,
only look at the ABI and the unwinding libraries explicitly.
This should solve the issue reported by @dim in [1].
[1]: https://discourse.llvm.org/t/15-0-0-rc1-has-been-tagged/64174/22
Differential Revision: https://reviews.llvm.org/D131037
(cherry picked from commit b7fb8563974d83f9eb8191fdfbebfd04147a2cbd)
|
|
(cherry picked from commit 3d5d44269c933849068c073f356002940f85bce4)
|
|
Co-authored-by: Konstantin Varlamov <varconst@apple.com>
Differential Revision: https://reviews.llvm.org/D129859
(cherry picked from commit 68264b649461206dc095e672eacf8a003e0b9e49)
|
|
Differential Revision: https://reviews.llvm.org/D130979
(cherry picked from commit 8a78b72289c5b1cb2ea2f0794d5bb9836b0895d8)
|
|
Differential Revision: https://reviews.llvm.org/D130865
(cherry picked from commit 6bdb64223473585f783572c9fbf0673b4b324a35)
|
|
Co-authored-by: Konstantin Varlamov <varconst@apple.com>
Differential Revision: https://reviews.llvm.org/D129806
(cherry picked from commit 93172c1c2b10066628c85c9ff78eb882222fb304)
|