AMDGPU: Don't include stack size of chain callees (#234520)
Chain callees are always tail called into and overwrite the caller's
stack. Therefore, their stack size should not be added up to that of
their caller when computing the resource usage.
Assisted-by: AI
[lldb][test] Add a debugger fixture for SB API unit tests (NFC) (#243724)
The SB API unit tests require LLDB to be initialized, and most require a
debugger and target. Add a new SBDebuggerFixture, which does all that.
sysutils/u-boot-bananapi-r3: Add new port
U-Boot for the Banana Pi BPI-R3 (MediaTek MT7986), booting from the SD
card. A new mt7986 family in sysutils/u-boot-master installs BL2 from
sysutils/atf-mt7986 and a FIP with BL31 and U-Boot, made with
sysutils/fiptool.
The fragment enables the EFI loader and autoboot, which the board's
defconfig disables, and keeps the environment in the GPT partition named
"ubootenv" instead of at a fixed offset. U-Boot 2026.10 also needs
upstream commit 3ffad26f17cb for the MediaTek clocks before relocation;
without it the board resets in a loop.
Sponsored by: Alchemilla Ventures Private Limited
Reviewed by: jrm, manu
Differential Revision: https://reviews.freebsd.org/D61539
sysutils/u-boot-bananapi-r3-emmc: Add new port
U-Boot for the Banana Pi BPI-R3 (MediaTek MT7986), booting from the
onboard eMMC. A slave of sysutils/u-boot-bananapi-r3 with the eMMC
defconfig and the eMMC BL2.
Reviewed by: jrm, manu
Sponsored by: Alchemilla Ventures Private Limited
Differential Revision: https://reviews.freebsd.org/D61540
sysutils/atf-mt7986: Add new port
Arm Trusted Firmware-A for the MediaTek MT7986 (Filogic 830): BL2 for SD
card and eMMC boot with DDR4, and BL31.
MT7986 support is only in MediaTek's TF-A tree, which ships the DRAM
initialization as a prebuilt library.
Reviewed by: jrm
Sponsored by: Alchemilla Ventures Private Limited
Differential Revision: https://reviews.freebsd.org/D61536
sysutils/fiptool: Add new port
fiptool creates, inspects and updates Firmware Image Packages (FIP), the
container format of TF-A. Boot loaders on several Arm platforms read the
next boot stages, such as BL31 and U-Boot, from a FIP.
Reviewed by: jrm
Sponsored by: Alchemilla Ventures Private Limited
Differential Revision: https://reviews.freebsd.org/D61533
[CIR][NFC] Decouple target lowering selection from C++ ABI setup (#236537)
Select target lowering rules from the target triple without constructing
a `LowerModule` or allocating Clang target and C++ ABI state. Share the
factory with ABI lowering so type conversion can query target
representations independently.
Assisted-by: Codex / GPT-6
[libc][stdio] Implement putc_unlocked (#243329)
Implements `putc_unlocked` for Linux full builds.
Adds the entrypoint, internal header, stdio.yaml declaration, CMake
targets,
entrypoint entries for aarch64/riscv/x86_64, and three unit tests.
Part of #242485
GlobalDCE: Only clear the analyses of deleted functions (#243713)
GlobalDCE reported no preserved analyses whenever it deleted anything,
which clears every cached function analysis in the module. Refine this
to only discard analyses of erased functions.
callgrind instructions, opt -O3: kimwitu++ k.bc -0.07%, where the
cleared TargetLibraryInfo had to be computed again for each function.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[lldb][test] Fix DebuggerSupportsLLVMTarget always returning false (#243716)
SBStructuredData::GetStringValue returns the size needed to hold the
string, which includes the terminating NUL. The StringRef built from
that size never compared equal to the target name, so the helper
reported every target as unsupported.
[Flang][OpenMP] Fix missing implicit barrier for empty sections constructs. (#241735)
This patch fixes a missing implicit barrier at the end of an empty
`!$omp sections` construct, where threads could previously proceed
without synchronization, violating OpenMP semantics.
The fix ensures that `convertOmpSections` emits the required implicit
barrier when `sectionCBs` is empty, unless the `nowait` clause is
specified.
DeadArgumentElimination: Only invalidate the analyses of changed functions (#243712)
DeadArgumentElimination reported no preserved analyses whenever it
changed anything, discarding all cached function analyses in the
module. Refine this to functions whose calls or argumenst are changed.
callgrind instructions, opt -O3: kimwitu++ k.bc -0.21%, sqlite3 -0.11%.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[AMDGPU] Use SCC branches for uniform truncates to i1 (#241944)
A branch on a set low bit reaches isel as brcond (truncate x), either
from an IR trunc to i1 or from SimplifySetCC folding (and x, 1) != 0
into truncate x. The uniform truncate-to-i1 patterns already select to
S_CMP and produce SCC, but isCBranchSCC only accepted SETCC, so the
branch went through s_cselect, a lane mask and EXEC before branching on
VCC.
Also accept a one-use uniform truncate from i16, i32 or i64, the source
types the SCC-producing patterns in SIInstructions.td cover, so these
branches become s_bitcmp + s_cbranch_scc. Divergent truncates keep the
lane-mask path.
Assisted-by: Claude Opus 5.5