[LLDB] Make PythonRuntimeLoader a posix platform library (#228598)
The symbol ForEachPythonRuntimeCandidate is required when python is
enabled on LLDB. However, it is only provided by Linux platform now.
Make such soure code be compiled under all Posix platform other than
Darwin or it causes link error.
[AMDGPU][NFC] Extract GCNDownwardRPTracker::retireVirtReg (#228289)
Pull the per-register retirement logic out of advanceBeforeNext() into a
helper. The operand reference is replaced by the register argument.
A follow-up change needs to retire dying uses and dead defs at different
points in the walk, which requires this logic to be callable from more
than one place.
https://github.com/llvm/llvm-project/pull/228294 depends on this patch.
Assisted-by: Cursor/Claude Opus
ORC: Fix flaky OrcLazy tests
I've seen this fail a few too many times so just let AI deal with it. I don't
know anything about orc, but extend lifetime of lock_guard seems plausible.
Notify lookupInitSymbols CV while holding the mutex
The init-symbol lookup completion callback decremented Count under
LookupMutex but called CV.notify_one() after releasing it. The waiting
thread could observe Count == 0, return from lookupInitSymbols, and
destroy the stack-allocated mutex and condition variable before the
callback signalled it. With concurrent compile threads the callback runs
on a dispatcher thread, so the late notify wrote into reused stack
memory, e.g. during endSession right after deinitialize.
This caused intermittent crashes in
ExecutionEngine/OrcLazy/multiple-compile-threads-basic.ll on macOS
(#50408, #126982). MachOPlatform and ELFNixPlatform already notify their
bootstrap condition variables under the mutex for the same reason.
[2 lines not shown]
CodeGen: Prefer getting the Triple from the Module
Take the triple from the contextual module rather than TargetMachine
when it's already readily available.
Co-authored-by: Claude Opus 5 <noreply at anthropic.com>
CodeGen: Prefer getting the Triple from the Module when convenient
Take the triple from the contextual module rather than TargetMachine
when it's already readily available.
CodeGen: Run LiveIntervals before PHIElimination and drop LiveVariables from it
Move LiveIntervals to run before PHIElimination in the optimized register
allocation pipeline, and make PHIElimination maintain LiveIntervals only.
This removes the last explicit use of LiveVariables. The actual analysis is no
longer used. There are implicit dependencies on the side effects of running the
analysis due to adjustments of dead flags, so further work is still needed to
complete the removal.
This perturbs register allocation in a number of tests. The same codegen result
can be achieved by not preserving the analysis and recomputing fresh. Greedy is
just sensitive to the exact slot index and value numbering with identical MIR.
Measured across every affected test the emitted instruction count goes from
145124 to 145196, +0.050%, with changes in both directions. The largest
regression is AArch64/phi.ll, where the GlobalISel output gains about 30
instructions and no longer matches the SelectionDAG output; the largest
improvements are ARM/fpclamptosat.ll and PowerPC/common-chain.ll.
[2 lines not shown]
CI: apt-get update before installing smatch dependencies (#19237)
The smatch job installs packages without refreshing the runner's
package lists. Since 2026-09-30 the lists in the runner image point
at a libdbi-perl security update that the mirrors no longer carry, so
the install fails with "404 Not Found" and every smatch run fails
before smatch is built. Run apt-get update first, as #18609 did for
the purge step of the other workflows.
Signed-off-by: Will Rouesnel <wrouesnel at wrouesnel.com>
Reviewed-by: George Melikov <mail at gmelikov.ru>
Reviewed-by: Tony Hutter <hutter2 at llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
[ClangIR] Support __builtin_coro_noop (#227573)
Support `__builtin_coro_noop` in ClangIR:
- Add `CIR_CoroNoopOp` (`cir.coro.intrinsic.noop`) in `CIROps.td` with
TableGen lowering to `llvm.coro.noop`.
- Handle `Builtin::BI__builtin_coro_noop` in `CIRGenBuiltin.cpp`.
- Add roundtrip (`clang/test/CIR/IR/coro-noop.cir`) and DirectToLLVM
lowering (`clang/test/CIR/Lowering/coro-noop.cir`) tests.
- Uncomment and test `__builtin_coro_noop()` in
`clang/test/CIR/CodeGenCoroutines/coro-builtins.cpp` with both CIR and
LLVM checks for parity with classic Clang CodeGen.
Closes #227561
DAG: Gracefully diagnose missing fp-compare libcall when softening (#228416)
Avoid fatal errors, and legalize to poison with a proper context error.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
[SPIRV] Don't treat noipa aliasees as interposable in SPIRVPrepareGlobals (#228178)
SPIRVPrepareGlobals replaces aliases with their aliasee because the
backend can't lower GlobalAlias. It must skip aliasees that may be
replaced at link time, but `isInterposable()` also returns true for
`noipa` function definitions by default. `noipa` doesn't change which
definition is used at link time, so query
`isInterposable(/*CheckNoIPA=*/false)` so aliases of `noipa` functions
are still replaced.
This is one of a few refinements of noipa identified while working on
making optnone imply noipa - without these refinements,
optnone-implies-noipa, might substantially change clang -O0 codegen. I'm
open to discussing whether these refinements are the right direction,
though.
Assisted-By: Claude
[llvm][Support] Remove stale `ErrorOr` documentation regarding user data. (#227796)
Optional user data support was removed from `ErrorOr` in ca35ffe6a239 in November 2013.
Update the network page for the current NetworkMgr net_api
NetworkMgr's net_api now appends the full caps string, the security
type and an enterprise flag to each access point entry. The page read
ssid_info[-1] as the caps string, so it got the enterprise boolean and
crashed on any WPA or WEP password. It now reads ssid_info[7].
Port the networkmgr connection handling. WPA-Enterprise networks open
an EAP authentication dialog and are written with write_eap_config.
Open networks get a quoted SSID in wpa_supplicant.conf, and every write
to that file uses a 077 umask. Secured access points show the -secure
signal icons.
Bring up any WiFi card that is down before the first scan, and add a
Rescan button next to the wired status when a WiFi card is detected.
The rescan runs in a thread and updates the status and access point
list on the GTK main loop.
Connecting to a known SSID no longer blocks the UI, status updates
[8 lines not shown]
[TableGen][AArch64] Relax EnforceVectorSubVectorTypeIs for mixing fixed and scalable vectors. (#228552)
The minimum elements of a fixed subvector may be greater than or equal
to the minimum elements of the scalable vector when vscale is greater
than 1. With a fixed subvector and a scalable vector we now allow the
subvector to have the same minimum elements as the vector. That covers a
NEON subvector and a SVE vector.
It is possible to have a subvector with more minimum elements than the
vector when vscale is known to be greater than 1, but both RISC-V
vectors and SVE use custom isel rather than tablegen for those cases.
With that fixed, migrate AArch64 to use
extract_subvector/insert_subvector instead of
vector_extract_subvec/vector_insert_subvec. A follow up will remove
vector_extract_subvec/vector_insert_subvec.