[compiler-rt][asan] Check ASAN_AVOID_EXPENSIVE_TESTS in ThreadedQuarantineTest (#232682)
Relates to #232239
This test creates 3000 threads which often hits resource limits on our
machines. I intend to make it respect EAGAIN, but in the meantime, I am
adding ASAN_AVOID_EXPENSIVE_TESTS in the same way it's done in
ManyThreadsTest.
I picked 90 for the lower amount because it's the same ratio used in
ManyThreadsTest. Might need to be lower in practice.
[NFC][analyzer] Deduplicate logic in ProgramPoint (#231527)
Trivial cleanup to avoid the duplication of tricky pointer arithmetics
and consistently assert the core invariants in both constructors.
sysutils/f3: Fix build on i386
The MIN macro in libutils.h had no support for ints, as a result commit
bf3dd41 caused f3 to fail to compile on 32-bit architectures. Fixed
upstream in 0d08c4e.
Approved by: yuri (mentor)
Differential Revision: https://reviews.freebsd.org/D60719
[debuginfod] Abort cached file stream if request fails (#232038)
When an HTTP request fails while it already received some data, the
cached file stream is never committed. Destroying it in that state
raises a fatal error, crashing the program (see #184728).
This PR adds an `abort` method that should be called in this situation
before destroying the stream. For the default implementation, only the
output stream is closed. For the `CacheStream` in `llvm::localCache`,
the temporary file is discarded as well.
The test is based on David's reproducer. Since WinHttp seems to discard
the content-length header, I switched to timing out the response
instead.
Fixes #184728. This is still a bug for the symstore locator in lldb, but
I'll fix that in a followup.
[runtimes] Build clang-scan-deps before configuring external projects
CMake discovers clang-scan-deps during compiler detection. With CMP0155
set to NEW, C++20 and newer targets such as the libc++abi object libraries
are scanned for module dependencies. Runtime configuration can currently
run before the scanner is built, leaving generated commands that invoke
CMAKE_CXX_COMPILER_CLANG_SCAN_DEPS-NOTFOUND.
Include clang-scan-deps in the default toolchain tools so it is available
before external projects are configured. Existing target filtering keeps
configurations without the scanner target supported.
Validated with a focused CMake 3.31.12 external-project fixture: runtime
configuration fails before the change, then discovers the scanner and
builds a C++23 object after it. Configuration without a scanner target also
passes.
Assisted-by: Codex
[LV] Remove single use restriction on ee-with-stores condition recipes. (#231137)
The vectorization style currently used for ee-with-stores and the
additional proposed styles do not need to copy the condition recipes
into the preheader or create phis, since we're not determining early
exits before entering the vector iteration in which they occur.
Instead, we're just moving the recipes to the top of the vector loop. As
such, we don't need to restrict the number of users, since we know the
affected recipes will be executed before any other users.
system: fix scope change validation
Uses isDefault(), but also provides getDefault() which I think
could be of value in the future. Easily added to a unit test
in any way.
Drop the note about /etc/passwd -- it was 2024 and we no longer
write any users to the OS.
[LV] Rewrite Scalable preference computation (NFCI)
The computation is now in a single place, making precedence easier to
understand. The change is not completely NFC, but it is NFC where it
matters to keep the computation simple.
Previously, -force-vector-width="vscale x ..." would always override
-scalable-vectorization and yield Scalable=SK_AlwaysScalable. Now,
-scalable-vectorization always take precedence over -force-vector-width
to keep things simple. In practice, it doesn't really matter because
both CLI debug options aren't used together when a "vscale x ..." width
is forced.
[VPlan] Remove dead InsertValue handling (NFC). (#232263)
Legality rejects every insertvalue in the loop: canWidenResultType only
accepts struct results for calls. Remove dead InsertValue handling
throughout the vectorizer.
PR: https://github.com/llvm/llvm-project/pull/232263
[mlir][DLTI] Introduce an operation interface for scoped DLTI queries (#222776)
So far, DLTI queries have relied on scanning discardable attributes for
values implementing DLTIQueryInterface. This is problematic when that
data is used to determine operation semantics: semantic information
belongs in an operation's inherent attributes/properties, and should
have an explicit contract rather than depend on arbitrary discardable
attribute attachments.
Introduce DLTIQueryOpInterface, an OpInterface instead of the existing
AttributeInterface, with symmetric queryDlti and setDlti methods for
individual keys. Provide default implementations backed by an inherent
dlti attribute. Updates preserve unrelated map entries, a null value
removes a key, and attempts to mutate non-map representations fail.
Resolve the first query key by walking the operation and its ancestors
that implement the new interface, continuing upward when a scope cannot
answer that key. Resolve subsequent keys recursively through the
returned attribute's DLTIQueryInterface without restarting the ancestor
[23 lines not shown]
[VPlan] Only create latch phis for values that need them. (#232282)
Update foldTailByMasking to not create phis for values defined in the
header/latch. Those values trivially do not need phis.
More generally, any block that dominates the latch should not need phis,
but that shape cannot happen currently (and we do not have a VPDT handy
to re-use).
PR: https://github.com/llvm/llvm-project/pull/232282
[clang][CIR] Require x86 backend for cir-input-lower.cpp (#232669)
Fixes #232506
Test fails on our CIR bot:
https://lab.llvm.org/buildbot/#/builders/242/builds/619
error: unable to create target: 'No available targets are compatible
with triple "x86_64-unknown-linux-gnu"'
Relates to #232235
system: fix scope change validation
Uses isDefault(), but also provides getDefault() which I think
could be of value in the future. Easily added to a unit test
in any way.
Drop the note about /etc/passwd -- it was 2024 and we no longer
write any users to the OS.
[lldb][test] Disable TestUpdateBreakpointCondition.py on Windows on Arm (#232657)
Flaky on the buildbot,
see https://github.com/llvm/llvm-project/issues/206141.
For example https://lab.llvm.org/buildbot/#/builders/141/builds/24244
<...>\TestUpdateBreakpointCondition.py", line 67, in
test_update_condition_python_api
self.assertTrue(thread.IsValid(), "Should stop at x > y condition")
^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'IsValid'
Relates to #232235.
Services: Kea DHCPv4: Add a simple shared_networks option to subnets
Subnets can now select an interface, subnets with the same interface will be put into a shared network.
This means its not decided by the interface IP of the receiving interface anymore, but by a mandatory client-classes membership
which is decided by matching a single DHCP option of the users choice as the gatekeeper to the subnet.
This way, multiple subnets can be served from the same interface.
backported version
[lldb] Interpret the ptrauth intrinsics in IRInterpreter (#232467)
This PR is to upstream the support for `__ptrauth`-qualified pointer in
`IRInterpreter` on arm64e. The first commit is the downstream commit to
implement this support, and the second commit is to migrate the test to
recent test base class `Arm64eTestBase`.
---------
Co-authored-by: Adrian Prantl <aprantl at apple.com>
Co-authored-by: Vedant Kumar <vsk at apple.com>
Co-authored-by: Fred Riss <friss at apple.com>
[libc++] Provision a suitable CMake for CI builds
The previous commit raised cmake_minimum_required to 3.31. The GitHub
jobs already satisfy it (the Linux image pins 3.31.0, macOS uses brew,
Windows uses the hosted image), but some self-hosted Buildkite agents
ship an older CMake and their images cannot be updated by us.
Teach run-buildbot to check the CMake version up front. When the cmake
on PATH is new enough, this costs a single `cmake --version` and nothing
else changes. Otherwise, download a pinned, SHA-256 verified CMake
3.31.12 release binary into ${XDG_CACHE_HOME:-~/.cache}/libcxx (outside
the build directory that run-buildbot wipes) and, when no binary exists
for the host or it cannot run there, bootstrap it from source with the
host compilers rather than the runtime's CC/CXX. The install is
published with an atomic rename so concurrent builders on one agent
never see a partial cache entry.
An explicit CMAKE override is still honored but now validated; in the
provisioned or overridden cases its directory is prepended to PATH so
[5 lines not shown]
[AArch64][FMV]Set undetectable dependent features during initialization (#231912)
Some targets don't set bits in __aarch64_cpu_features for all dependent
features of given feature during initialization as they cannot be
detected at runtime. This leads to incomplete initialization of
__aarch64_cpu_features, preventing resolver from selecting the right
version.
This patch manually sets those undetectable dependent features.
---------
Co-authored-by: Tomas Matheson <Tomas.Matheson at arm.com>
[libsycl] Introduce Kernel name based cache (#225865)
This PR introduces a kernel name based cache, such that repeated
submissions of the same `kernel` on the same `context` & `device`, skip
most of `ProgramAndKernelManager::getOrCreateKernel` procedure for
compatibility and preparation.
Caches are owned by `DeviceKernelInfo` which is provided by the fat
binary at point of registration. As such each Kernel has an
unoredered_map of `(Context, Device)` -> `(Symbol)`. For every new
context or device combination for a kernel, there will be a first time
cost going through the whole procedure for compatibility and
preparation.
Assisted by Claude