[orc-rt] Add C API for Session::callController. (#212204)
Add orc-rt-c/Session.h with a C API, orc_rt_Session_callController,
wrapping the C++ Session::callController method.
AMDGPU: Start using subarch in attributor instead of subtarget
Avoid querying the subtarget for functions when the relevant
properties are known from the triple. The various subtarget
group size functions should also be decoupled from the subtarget,
but those are trickier to untangle.
Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
clang/AMDGPU: Stop passing redundant -target-cpu to cc1
Now that the exact target is encoded in the triple's subarch field,
-target-cpu is redundant. This avoids polluting the resultant IR with
unwanted "target-cpu" attributes. The net result is the desired codegen
when compiling libraries for a major subarch and linking it into a
program compiled for a specific arch. e.g., compiling for "gfx9-generic"
would pollute the IR with "target-cpu"="gfx9-generic", so codegen
would ultimately be performed for the generic target even after
linking into the concrete gfx9 cpu. The specialization will now be
achieved by merging the triples without the linker or optimization
passes needing to fixup function attributes.
clang: Start using new amdgpu subarch triples
Fixup invocations using --target=amdgcn + -mcpu to introduce
the subarch in the triple.
For offload toolchains, a single toolchain is constructed for the
top level amdgpu architecture, and the effective triple is used for
target specific tool invocations.
The specifics of the resource directory layout are tbd. This does
try to find resources in the subarch named directory. The paths
are searched at toolchain creation time, so that does not work
when there are multiple subarches.
Fixes #154925
[IR][NFC] Rename insertDbgValueIntrinsic -> insertDbgValue (#212151)
Rename `insertDbgValueIntrinsic` to `insertDbgValue`, which is
consistent with the other insert helpers like `insertDbgAssign`,
`insertDeclare`, etc.
Also use debug record instead of intrinsic terminology in doc comments.
[NFC][analyzer] Eliminate NodeBuilder in VisitBlockExpr (#211865)
This is part of the commit series that gradually eliminates the class
`NodeBuilder` from the analyzer engine.
This is a straightforward case where `makeNodeWithBinding` can be
clearly applied.
The node set `Tmp` was superfluous because we can directly pass the node
to `runCheckersForPostStmt` where it will be implicitly converted to a
one-element set. (There are many precedents for this.)
Also notice that we explicitly pass the `State` to `makeNodeWithBinding`
because it can be different from `Pred->getState()` (which would have
been used implicitly by the 4-argument form of `makeNodeWithBinding`.)
handbook/cutting-edge: Add an introduction
Add an introduction section which explains the terms “major version”,
“minor version”, and “patch level”, explains the difference between
updating and upgrading, and outlines what sort of upgrades we do and do
not support.
It is unfortunate that the FreeBSD support model is not documented in
the Handbook or, indeed, anywhere except our mailing list archive. As a
compromise, this introducion links to the security page on the website,
which briefly mentions the support model and links to the relevant
emails in the archive.
Reviewed by: carlavilla, imp
Differential Revision: https://reviews.freebsd.org/D58471
lang/rust{,-bootstrap}, Mk/Uses/cargo.mk: Relax COMPAT_FREEBSD11 check
lang/rust{,-bootstrap} themselves do not need COMPAT_FREEBSD11 any more,
nor do crates that don't depend on pre-0.2.176 libc. For those that
still do, emit a warning for porters to see so that we can eventually
fully move away from needing COMPAT_FREEBSD11.
Note lang/rust188, and the bootstrap 1.87 it depends on, both predate
1.93, the first version of rust itself to use libc >= 0.2.176, so the
check remains in lang/rust188.
Note also Mk/bsd.gecko.mk does its own thing due to the vendored crates,
and will need its own approach to this issue.
PR: 281600
Reviewed by: mikael (rust)
Approved by: mikael (rust)
MFH: 2026Q3
(cherry picked from commit 4dc0e9ac42ad5c6a6cdab9bbc987adaa25ab24ce)
Mk/Uses/cargo.mk: Drop stray backslashes from DEV_ERROR/WARNING messages
These appear as literal backslashes in the output rather than escaping
anything.
PR: 281600
Reviewed by: mikael (rust)
Approved by: mikael (rust)
MFH: 2026Q3
(cherry picked from commit f6977b775285d4bebb4711f17101fb12c636e1f9)
[InstCombine][NFC] Reorder isKnownAlways(Mask) check in foldIntrinsicIsFPClass (#212216)
Fixes #189949
The preceding mask-narrowing step already guarantees `Mask` is a subset
of `Known.KnownFPClasses` by the time the old equality check ran, so
`Mask == Known.KnownFPClasses` was already equivalent (see #190504).
This patch replaces that equality check with `Known.isKnownAlways(Mask)`
(matching the SelectionDAG equivalent's naming) and moves it before the
narrowing step, avoiding a redundant worklist re-visit.
Added a regression test in `is_fpclass.ll`.
lang/rust{,-bootstrap}, Mk/Uses/cargo.mk: Relax COMPAT_FREEBSD11 check
lang/rust{,-bootstrap} themselves do not need COMPAT_FREEBSD11 any more,
nor do crates that don't depend on pre-0.2.176 libc. For those that
still do, emit a warning for porters to see so that we can eventually
fully move away from needing COMPAT_FREEBSD11.
Note lang/rust188, and the bootstrap 1.87 it depends on, both predate
1.93, the first version of rust itself to use libc >= 0.2.176, so the
check remains in lang/rust188.
Note also Mk/bsd.gecko.mk does its own thing due to the vendored crates,
and will need its own approach to this issue.
PR: 281600
Reviewed by: mikael (rust)
Approved by: mikael (rust)
MFH: 2026Q3
Mk/Uses/cargo.mk: Drop stray backslashes from DEV_ERROR/WARNING messages
These appear as literal backslashes in the output rather than escaping
anything.
PR: 281600
Reviewed by: mikael (rust)
Approved by: mikael (rust)
MFH: 2026Q3
[offload] Split olMemAlloc to separate functions (#209196)
At the previous community meeting, we agreed to introduce contexts into
the liboffload API. I also mentioned that, as part of this work, we
could split the allocation function into three separate functions, but
we did not discuss this idea in detail.
This patch only splits the allocation functions, allowing us to discuss
and agree on the proposed interface before introducing contexts into the
`olMemAlloc` API.
Once contexts are added, the device parameter will be removed from host
allocations, and the final interface would look like this:
```c
ol_result_t olMemAllocDevice(ol_context_handle_t, ol_device_handle_t, size_t, void **);
ol_result_t olMemAllocHost(ol_context_handle_t, size_t, void **);
ol_result_t olMemAllocManaged(ol_context_handle_t, ol_device_handle_t, size_t, void **);
```
[10 lines not shown]
ARM: Mark more generic libgcc functions as available
Generic libgcc/compiler-rt functions coexist with aeabi variants
(e.g., __divsi3 and __aeabi_idiv) according to my reading of the
build. At least in compiler-rt, they are aliases (such that I'm not sure
what the point of ever emitting the __aeabi name is).
They were previously removed from the available set on AEABI+AAPCS targets
to force selection of the preferred __aeabi_* variants, back when
only one implementation per libcall could be recorded.
Now that multiple implementations can be available per libcall, stop hiding
the generics and select the __aeabi_* variant explicitly as the preferred
implemntation. This reduces the number of special cases to consider for
future libcalls info improvements.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
rc.subr: Fix premature return from wait_for_pids
Use pwait's new -r option to wait until the target processes have not
only terminated, but also been reaped.
PR: 293183
MFC after: 1 week
Sponsored by: Klara, Inc.
Sponsored by: NetApp, Inc.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D58391
pwait: Test the new -r option
Test that pwait without -r reports a process as soon as it terminates,
while pwait with -r does not report it until it has been reaped.
MFC after: 1 week
Sponsored by: Klara, Inc.
Sponsored by: NetApp, Inc.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D58385
pwait: Add a SIGINFO handler
On SIGINFO, print a space-separated list or remaining processes to
standard error.
MFC after: 1 week
Sponsored by: Klara, Inc.
Sponsored by: NetApp, Inc.
Reviewed by: kib, markj
Differential Revision: https://reviews.freebsd.org/D58386
pwait: Optionally wait until process is reaped
If the new -r option is specified, wait until the target process not
only terminates but is reaped.
MFC after: 1 week
Sponsored by: Klara, Inc.
Sponsored by: NetApp, Inc.
Reviewed by: kib, markj
Differential Revision: https://reviews.freebsd.org/D58314
kqueue: Add NOTE_REAP
Add a NOTE_REAP event for EVFILTER_PROC which provides a notification
when the process is reaped.
MFC after: 1 week
Sponsored by: Klara, Inc.
Sponsored by: NetApp, Inc.
Reviewed by: kib, markj
Differential Revision: https://reviews.freebsd.org/D58313
devel/llvm12: greatly slim the set of options
At this point this port is mostly required for devel/openjdk11 on
powerpc. Remove most options not relevent to this function.
This will cut build time on the cluster and for dependent ports.
Sponsored by: DARPA, AFRL
devel/llvm-{cheri,morello}: new snapshots
Update CHERI and Morello LLVM compilers to new snapshots.
Attempt to fix builds with LLVM 21 by conditionally applying the patch
used with devel/llvm17. I'm not applying it universally as llvm-morello
fails to compile with it on my 14.4-RELEASE test system.
Sponsored by: DARPA, AFRL
devel/oclgrind: update to 26.03.1
This release is reported to work with LLVM 18 though 22 rather than the
ancient llvm12 the previous version was using. This update is only
compile-tested.
devel/llvm22: backport commit 93a67259cf23 from llvm git
[ToolChains][FreeBSD] Set default Linker to LLD for FreeBSD (#190596)
When the linker is specified as ld, toolchain applies special handling
by invoking (triple)-ld instead of resolving ld via standard PATH
lookup. This causes GNU ld installed via the system package manager to
take the precedence (since (triple)-ld appears earlier in the search
path), effectively overriding ld.lld.
As a result, we set the default Linker on FreeBSD to ld.lld to indicate
we want to use lld by default.