[CIR][OpenMP] Add support for OpenMP reduction clause
This patch adds support for the OpenMP reduction clause on the teams and for
directives for reductions with built-in identifiers on local scalar integer and
floating-point variables. Other cases, such as user-defined reductions,
modifiers, arrays and globals, are reported as not yet implemented.
Assisted-by: Cursor / Claude Opus 5.5 Medium
[CIR][OpenMP] Add support for 'distribute parallel for' with 'target teams'
Adds support for handling the full '[target] teams distribute parallel for'.
Introduces setting the omp.composite attibute for the 'distribute parallel for'
composite construct.
Assisted-by: Cursor / Claude Sonnet 5 High
[CIR][OpenMP] Add initial support for the 'distribute' directive (#232781)
This patch adds initial support for the OpenMP 'distribute' directive.
Basic code generation for the standalone and combined cases is
introduced. Support for clauses will be added in the future. The
composite 'teams distribute parallel for' form will be added in a
subsequent patch.
Assisted-by: Cursor / Claude Sonnet 5 High
[SelectionDAG] improve `VECTOR_SHUFFLE_VAR` legalization (#243996)
Type legalization of `VECTOR_SHUFFLE_VAR` currently always does a scalar
expansion through the stack. When the target lowers `shuffles` natively,
legalize it into native shuffles instead.
If only the mask needs splitting but the result type is legal, truncate
the mask to the result element width (unless the vector type has too
many elements in which case use the appropriately wider type). Scalable
vectors bound their element count with `vscale_range`. This lets masks
wider than the data use AArch64 `TBL` and X86 `PSHUFB`/`VPPERM`
If the result needs splitting, for fixed vectors each result half
selects between shuffles of the two source halves,
Res[i] = Idx[i] < NumLo ? SrcLo[Idx[i]] : SrcHi[Idx[i] - NumLo]
Splitting into K legal parts makes `K^2` part shuffles, so this is only
done when `2 * K^2 <= element count`. Shuffles of few wide elements
[5 lines not shown]
[orc-rt] Add IntervalMap::size and IntervalSet::size. (#249362)
size() returns the number of ranges in the map or set. Adjacent ranges
that have been coalesced count as one.
[x86] Change Recent Intel client CPUs to use the Lunarlake Model (#248366)
"arrowlake" and "arrowlake-s" use the same Lion Cove P-cores as Lunar
Lake.
"pantherlake" and "wildcatlake" has newer Cougar Cove P-cores as Lunar
Lake but misses its own model.
Until there are no new better fitting schedule models use the model from
Lunar Lake.
This PR changes the following ProcModel: arrowlake, arrowlake-s,
wildcatlake and pantherlake to use the one from Lunarlake.
Add PISA codegen pipeline and lowering passes
Add the IR- and MIR-level passes that make up the PISA code generation
pipeline and wire them into PISAPassConfig in PISATargetMachine:
- Intrinsic handling: PISAEmitIntrinsics, PISAExpandIntrinsics,
PISAReplaceIntrinsics
- Call/ABI lowering: PISALegalizeCalls, PISAKernelByValArgsLowering
- IR preparation: PISAPropagateNullPointers, PISALayout, PISAConstProp
- Legalization/verification: PISALegalizePredicates, PISAVerifyTypes,
PISAVerifier
- Post-selection: PISAScopeSelector, PISACacheHintSelector,
PISALegalizeSubregAccess, PISAOptimizeSubregAccess,
PISAOptimizeRedundantCopies, PISAMarkConvergentNoMerge,
PISAInsertLifetimeStart
PISAPassConfig now overrides the GlobalISel and pre/post-regalloc hooks
to run these passes, disables the machine passes that assume physical
registers, and runs the load/store vectorizer and atomic expansion in
[4 lines not shown]
[CIR][OpenMP] Add support for OpenMP reduction clause
This patch adds support for the OpenMP reduction clause on the teams and for
directives for reductions with built-in identifiers on local scalar integer and
floating-point variables. Other cases, such as user-defined reductions,
modifiers, arrays and globals, are reported as not yet implemented.
Assisted-by: Cursor / Claude Opus 5.5 Medium
[GVN] Bail out on atomic loads in select availability checks (#249333)
An atomic load through a select cannot be replaced with values from
other loads, as atomic loads can only be forwarded from stores in this
case.
As a result, we bail out on atomic loads in the select availability
checker to prevent miscompilation.
Assisted-by: Claude # Test
[CIR][OpenMP] Add support for 'distribute parallel for' with 'target teams'
Adds support for handling the full '[target] teams distribute parallel for'.
Introduces setting the omp.composite attibute for the 'distribute parallel for'
composite construct.
Assisted-by: Cursor / Claude Sonnet 5 High
[VPlan] Don't record uses by ephemeral recipes in register usage. (#249512)
calculateRegisterUsageForPlan skips ephemeral recipes, but still records
their operands as uses, keeping values live until the assume. Skip them
entirely.
[VPlan] Keep multiplier type when unrolling WideActiveLaneMask. (#249513)
unrollBlock replaces the multiplier of WideActiveLaneMask with UF as a
constant of the canonical IV type. The lane mask blending reductions
used on uncountable early exits uses the type of FirstActiveLane (i64)
for its multiplier, which crashed with "scalar type of new operand must
match the old operand" for narrower canonical IVs, e.g. i32.
Create the UF constant with the type of the existing multiplier.
[CIR][OpenMP] Add support for OpenMP reduction clause
This patch adds support for the OpenMP reduction clause on the teams and for
directives for reductions with built-in identifiers on local scalar integer and
floating-point variables. Other cases, such as user-defined reductions,
modifiers, arrays and globals, are reported as not yet implemented.
Assisted-by: Cursor / Claude Opus 5.5 Medium
[CIR][OpenMP] Add support for 'distribute parallel for' with 'target teams'
Adds support for handling the full '[target] teams distribute parallel for'.
Introduces setting the omp.composite attibute for the 'distribute parallel for'
composite construct.
Assisted-by: Cursor / Claude Sonnet 5 High