[MLIR][CAPI][Python] Add support for querying memory effect instances (#213459)
The current memory-effect bindings are write-only. Python interface
implementations can append effects to a temporary
`MemoryEffectInstancesList`, but callers cannot inspect an effect
instance or ask an operation for its effects.
This patch adds the missing query support to the C API and exposes it in
Python. Effect instances can be inspected and copied, and the Python
APIs use regular `MemoryEffectInstance` objects and Python-native
`list`s. The Transform helpers follow the same model.
`MemoryEffectInstancesList` is **removed** from both the C and Python
APIs. Python implementations and helpers now return effects instead of
mutating a supplied list, while the C API passes effects through
callbacks (`MlirMemoryEffectInstancesCallback`).
When an API produces a batch of effects, it invokes
`MlirMemoryEffectInstancesCallback` with a count and an array. The
[15 lines not shown]
[dyndbg][Clang] Avoid memcpy on nullptr from #216307 (#216625)
As reported in
https://github.com/llvm/llvm-project/pull/216307#issuecomment-5311023374,
the new tests fail on UBSan buildbots (e.g.,
https://lab.llvm.org/buildbot/#/builders/25/builds/19323) because the
directory may be empty (only the file is initialized [*]). The StringRef
from getDirectory() would be default-initialized, and hashing it results
in memcpy'ing from a null pointer.
This patch attempts to fix-forward by not hashing the output of
getDirectory() if it is empty.
[*] e.g., `!3 = !DIFile(filename:
"/usr/local/google/home/thurston/llvm-projectA/clang/test/DebugInfo/DynamicDebugging/<stdin>",
directory: "")`
CodeGen: Fix MachineSink trivial coalescing crash on an undef register
Fix unchecked getVRegDef use. Found by AI while working on something else.
Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
[ADT] Clean up FoldingSet.* (NFC) (#216619)
This patch cleans up minor issues in FoldingSet.*.
- FoldingSetBase::NodeID never existed in the history of FoldingSet.
The comment should refer to FoldingSetNodeID instead.
- GetBucketPtr lost the first line of its doc comment on February 4,
2008 in commit e2887863563f, leaving only "testing.".
- ImmutableSetTest.cpp was relying on FoldingSet.h to include
ArrayRef.h.
Other changes should be self-explanatory.
Assisted-by: Antigravity
www/bozohttpd: Use blocklist
Starting from FreeBSD version 1500000, prefer the new blocklist
nomenclature.
Once older versions are no longer supported, we should use blocklist
exclusively.
PR: 294080
[CIR] Correct union lowering behavior re-padding (#216349)
Most of the code that CIR lowers to LLVM counts on the fact that our
alignnments are correct/calculated in LLVM to get our layout correctly.
This works for the most part, and unions have the storage type of the
'highest' alignment type.
However, when creating a constant, we have to convert the type of the
union to have a 'storage' type that matches the data being inserted (not
the union's storage type!). The result was that if we had a storage type
where the alignment was smaller than the actual storage type, LLVM would
mis-calculate the padding.
This patch adds the padding explicitly when we make that conversion to
get the alignment set up correctly.
Note: there is one mild IR-equivilency-regression to this patch. There
isn't really a great way to tell the difference between a
union-tail-padding needing zero-init vs undef-init in this case. This
[2 lines not shown]
[CIR] Fix the 'constant'-ness of vtable-variables (#216434)
The createOrReplaceCXXRuntimeVariable sets the variable to be 'constant'
in classic codegen, this sets that right. However, 1 use of it (in
buildVTablePointer) doesn't match classic-codegen (it instead calls
getOrInsertGlobal directly), so this patch adds a bit of a fixup there
to minimize the impact of this change.
asmc: prefer MMIO backend over PIO when both are present
T2, T1, and some pre-T1 Macs advertise a legacy PIO
range in the SMC ACPI _CRS alongside a live MMIO window, but the
silicon behind the PIO range is bogus.
Try MMIO first, validate via LDKN >= 2, fall back to PIO if that
fails or no MMIO resource is present. Drop "(T2)" from the backend
message since MMIO isn't T2-exclusive.
MFC: 1 week
Reviewed by: ngie
Differential Revision: https://reviews.freebsd.org/D58839
[mlir] Fix RemoveDeadRegionBranchOpSuccessorInputs producing invalid scf.for
RemoveDeadRegionBranchOpSuccessorInputs builds its tied-value sets from
RegionBranchOpInterface::getSuccessorOperandInputMapping, which is derived from
getSuccessorRegions. For an scf.for with a statically-known trip count of 1,
getSuccessorRegions drops the region->region back edge (the loop provably never
iterates back). That back edge is what forwards a yield operand to the region
iter_args, so without it an iter_arg and its corresponding op result are no
longer tied through a shared operand. The pattern then removes a dead iter_arg
without its (structurally required) result, producing an scf.for with
mismatched loop-carried counts:
'scf.for' op mismatch in number of loop-carried values and defined values
The greedy driver repairs this on a later iteration (InlineRegionBranchOp folds
the single-trip loop), so it is only observed with
MLIR_ENABLE_EXPENSIVE_PATTERN_API_CHECKS, which verifies the IR after every
pattern application. It shows up across Linalg tiling / pack-unpack /
convolution lowering and scf loop canonicalization; see issue #163599.
[15 lines not shown]
testcases/libnvmm: Print more info and report total failures
* Print a few more details in the output logs.
* Run all tests to completeion and report the total number of failures
at the end.
RuntimeLibcalls: Provide fp128 long double libcalls on X86
16a8d8d038a3 removed the l-suffixed long double math functions
from the default set and re-added them per-target gated on
isLongDoubleF128, but X86 was not given the re-add. On targets
whose long double is fp128 (e.g. x86_64 Android/OHOS) this dropped
the fp128 l-suffixed libcalls.
Fixes the regression reported on #214944.
Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
[mlir] Fix RemoveDeadRegionBranchOpSuccessorInputs producing invalid scf.for
RemoveDeadRegionBranchOpSuccessorInputs builds its tied-value sets from
RegionBranchOpInterface::getSuccessorOperandInputMapping, which is derived from
getSuccessorRegions. For an scf.for with a statically-known trip count of 1,
getSuccessorRegions drops the region->region back edge (the loop provably never
iterates back). That back edge is what forwards a yield operand to the region
iter_args, so without it an iter_arg and its corresponding op result are no
longer tied through a shared operand. The pattern then removes a dead iter_arg
without its (structurally required) result, producing an scf.for with
mismatched loop-carried counts:
'scf.for' op mismatch in number of loop-carried values and defined values
The greedy driver repairs this on a later iteration, so it is only observed
with MLIR_ENABLE_EXPENSIVE_PATTERN_API_CHECKS (which verifies the IR after
every pattern application). It shows up across Linalg tiling / pack-unpack /
convolution lowering and scf loop canonicalization; see issue #163599.
[6 lines not shown]
PowerPC: Fix FMA reassociation crash on an undef multiply operand (#216602)
Make sure getVRegDef succeeded.
Found by AI while working on something else.
Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
CodeGen: Fix lookThruCopyLike crash on an undef register (#216598)
Found by AI while working on something else.
Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
multimedia:{ffmpeg,handbrake}: Switch dependency from onevpl to libvpl
onevpl has been superceded by libvpl upstream. So switch dependencies
of dependent ports.
PR: 293561
Reported by: Yuichiro NAITO <naito.yuichiro at gmail.com>
Approved by: portmgr (blanket; switch deprecated dependencies)
multimedia/libvpl: New port: Intel Video Processing Library API, dispatcher, and examples
Intel Video Processing Library (Intel VPL) provides access to hardware
accelerated video decode, encode, and processing capabilities on Intel GPUs
to support AI visual inference, media delivery, cloud gaming, and virtual
desktop infrastructure use cases.
This repository contains the following components:
- Copies of the Intel VPL API header files.
The version of the API is listed in the mfxdefs.h file.
- Intel VPL Dispatcher
- Examples demonstrating API usage
*** IMPORTANT ***
Intel VPL Tools are no longer in this repository. They have all been
moved to libvpl-tools.
[4 lines not shown]
multimedia/onevpl: Deprecate and set to expire on 2026-09-30
Upstream has been renamed to libvpl and libvpl-tools. Use
multimedia/libvpl and multimedia/libvpl-tools.
While here, add CONFLICTS_INSTALL=libvpl.
PR: 293561
Reported by: Yuichiro NAITO <naito.yuichiro at gmail.com>