[VPlan][Predicator] Preserve some uniform control flow
Implements "Partial Control-Flow Linearization" by Simon Moll and
Sebastian Hack. Does **NOT** improve predication/masking yet, so
applicability is artificially narrowed, only some uniform branches are
preserved. In particular, the following is left for future PRs:
* Block masks still contains now-unnecessary term for the preserved
uniform branches.
* Mixed blends/phis aren't supported yet. Detecting where they would be
necessary is as complex as implementing proper support (which would
need either Luke's `reconstructSSA` or Iterated Dominance Frontier),
so we also limit it to a trivial/structured CFG where there's only
single block where those would need to be inserted.
I think even the current version might be enough to start implementing
an alternative to https://github.com/llvm/llvm-project/pull/141900 (see
BOSCC in the paper).
[flang] - Call _FortranAAssignSimple instead of _FortranAAssign for intrinsic-type array assignments.
This patch adds support for calling _FortranAAssignSimple, a faster-path for array assignments.
`_FortranAAssignSimple` is called when ALL the following conditions are true:
1. Intrinsic element type (not derived type)
2. Matching ranks (no scalar-to-array broadcasting)
3. Non-volatile
4. Not polymorphic
5. Not explicit-length character
6. Not temporary LHS
Otherwise, uses `_FortranAAssign` (or specialized variants like `_FortranAAssignPolymorphic`, `_FortranAAssignExplicitLengthCharacter`).
This is a (perhaps final) part of the fix for https://github.com/llvm/llvm-project/issues/203915
[MLIR][OpenMP] Enable strict property assembly format (#217297)
Enable strict property assembly format mode for OpenMP. Spell OpenMP
assembly-only properties directly in directive and clause formats
instead of relying on generic property dictionaries.
Refresh OpenMP dialect, conversion, and LLVM target tests to use the
direct syntax for these properties.
Assisted-by: Codex
18359 virtio: virtio_queue_alloc() can return with vio_mutex held
Reviewed by: Bill Sommerfeld <sommerfeld at hamachi.org>
Reviewed by: Kyle Simpson <kyle at oxide.computer>
Reviewed by: Toomas Soome <tsoome at me.com>
Approved by: Dan McDonald <danmcd at edgecast.io>
18360 vioif reports a nonsense MAC_PROP_SPEED when the device speed is unknown
Reviewed by: Bill Sommerfeld <sommerfeld at hamachi.org>
Reviewed by: Kyle Simpson <kyle at oxide.computer>
Reviewed by: Toomas Soome <tsoome at me.com>
Approved by: Dan McDonald <danmcd at edgecast.io>
18361 vioif accepts offload features whose dependencies are missing
Reviewed by: Bill Sommerfeld <sommerfeld at hamachi.org>
Reviewed by: Kyle Simpson <kyle at oxide.computer>
Approved by: Dan McDonald <danmcd at edgecast.io>
18358 virtio_map_cap() reuses another device's BAR register number
Reviewed by: Bill Sommerfeld <sommerfeld at hamachi.org>
Reviewed by: Michael van der Westhuizen <r1mikey at gmail.com>
Reviewed by: Kyle Simpson <kyle at oxide.computer>
Approved by: Dan McDonald <danmcd at edgecast.io>
18304 add ddi_ncpus_expected(9F) for sizing per-CPU resources
Reviewed by: Robert Mustacchi <rm at fingolfin.org>
Approved by: Gordon Ross <gordon.w.ross at gmail.com>
[libc] Minor fixes/additions to signal.h header. (#217469)
* Fix a typo for si_overrun field inside siginfo_t struct (it is
accessible via `si_overrun` macro, and names should match)
* Add `sig_t` type which is used in BSD for signal handler function.
It's identical to GNU's `sighandler_t`, and glibc provides both. Clarify
this in their YAML entries.
* Add more Linux-specific `SI_*` values.
[clang] Redeclarations should inherit all unique SwiftAttrs (#217187)
SwiftAttrs are inherited by redeclarations but only the first attribute
was inherited, the rest was dropped. This behavior is confusing and
inconsistent that lead to some subtle bugs consuming these annotations.
This PR makes sure every instance with a unique argument is inherited.
Co-authored-by: Gabor Horvath <gaborh at apple.com>
[LoopFusion] Do not peel guarded loops to enable fusion (#217379)
Loop fusion currently tries to peel guarded loops to expose fusion opportunity.
The logic has a bug: Once we confirm two loops have small difference in
their iteration count and are eligible for peeling, we blindly allow them to
have different guards. The problem is that in some cases, conditions of the
loop guards have nothing to do with the loop iteration count. This is more
likely to be the case when a loop has constant iteration count. At the moment
fusion allows peeling only when both loops have constant iteration counts.
[lldb][test] Unlock the mutex completely before exiting the test (#217466)
This test fails with hardened libcxx otherwise.
Fixes #212872
---------
Co-authored-by: Med Ismail Bennani <ismail at bennani.ma>
Analysis: Move LibcallLoweringInfo from CodeGen to Analysis (#210322)
Middle end passes need to be able to reason about library call
availability and potentially emit them without depending on codegen.
TargetLibraryInfo already lives in Analysis, and this is a step towards
the eventual merger. For now this is a mostly mechanical move, type
erasing the reference to TargetSubtargetInfo.
The per-subtarget customization (TargetSubtargetInfo::initLibcallLoweringInfo)
is inverted into a caller-supplied function_ref, so the Analysis types
carry no CodeGen/TargetSubtargetInfo reference. The module map is keyed on
an opaque erased pointer. CodeGen continues looking up based on the subtarget.
It is not yet in a state where it is usable from middle end passes; that
will come later. In principle we should be able to write arbitrary rules based
on a function's ABI attributes for which calls can be used.
Co-authored-by: Claude (Claude Opus 4.8) <noreply at anthropic.com>