[OpenMPOpt] Look inside the callbacks the loop runtime functions are handed
The __kmpc_{distribute_,for_,distribute_for_}static_loop_* functions receive the
loop body as a callback, so a parallel region written inside that body is
reachable from the kernel through the runtime call. AAKernelInfo could not see
that, and recorded the call as reaching an unknown parallel region. A kernel
using these functions therefore always got a worker state machine whose only
option was to indirectly call whatever work function it was handed.
Describe the callback argument of each of these functions in OMPKinds.def and
attach the corresponding !callback metadata in OpenMPOpt, then fold the
callback's AAKernelInfo state into the caller's. The state machine can now
dispatch directly to the regions the loop body actually reaches. Relax the two
"more than one callee means give up" checks for functions carrying !callback,
since the callback edge is a second edge by construction and is analyzable.
The conservative unknown-region record is kept for the case that motivated it, a
callback we only see a declaration of.
[37 lines not shown]
[OpenMP][OMPD] Add symbol lookup helper for GDB plugin (#221956)
On LLVM today, `libompd.so` exists with `dlopen`, finds each API with
`dlsym` and checks error with `dlerror`.
**Missing piece**: There is no single place that:
load this library
look up this name
give me a real error string
**Issues**:
A later change would have to edit 30+ calls sites,
`dlerror()` is easy to misuse,
failures often drop the OS error string.
**Fix**: Add these helpers:
[5 lines not shown]
[mlir][vector] Extend `ShapeCastCreateMaskFolderTrailingOneDim` (#219494)
Extends `ShapeCastCreateMaskFolderTrailingOneDim` so that it also works
for leading unit dims. For example,
```mlir
%1 = vector.create_mask %c1, %c1, %dim, %c1 : vector<1x1x[4]x1xi1>
%2 = vector.shape_cast %1 : vector<1x1x[4]x1xi1> to vector<[4]x1xi1>
```
is folded as:
```mlir
%0 = vector.create_mask %c1, %dim : vector<[4]xi1>
```
To better reflect the extended functionality, the updated pattern is
renamed as:
* `ShapeCastCreateMaskFolderBoundaryUnitDim`.
It takes a template parameter to specify whether to consider
the leading or the trailing unit dims.
TwoAddressInstruction: Don't repair the unchanged def of a degenerate REG_SEQUENCE
When every source operand of a REG_SEQUENCE is undef, eliminateRegSequence emits
no COPY and rewrites the instruction in place to an IMPLICIT_DEF. The dead def of
DstReg is left untouched, so its live range is already correct. Passing DstReg to
repairIntervalsInRange then makes it re-add an overlapping segment with a fresh
value for the unchanged def, asserting in LiveInterval::addSegment.
Drop DstReg from the repaired set in this case. Exposed by -early-live-intervals
Co-authored-by: Claude (Claude-Opus-4.8)
[libcxx] Move premerge jobs to k8s mode runner set (#221395)
This allows setting the container image in the workflow definition which
should vastly simplify maintenance. The issues that we were running into
previously with jobs randomly aborting (and getting marked as passed)
have been fixed with some cluster-side config changes.
NAS-143111 / 26.0.0-RC.1 / Write a hardware entitlement record on unlicensed iX appliances (by sonicaj) (#19656)
This PR adds changes to give an iX appliance that shipped without a
license a minimal legacy license record during upgrade, written by a new
script that runs chrooted in the new boot environment. The record is
stamped with a marker in customer_key, and parse_legacy_license grants
it exactly what bare appliance hardware already gives rather than
everything a legacy license implies. SED is the motivating case, since
its vector moves to hardware plus key later and these machines would
otherwise lose it.
LicenseInfo grows an origin field so we can tell a record we wrote from
one an issuer signed. Entitlements never read it, since a system
generated record has to resolve exactly as an issued one does; it is
there for the alert source, the unlicensed to licensed hook, TNC, and
support tickets, which all mean "iX issued this".
Original PR: https://github.com/truenas/middleware/pull/19643
[3 lines not shown]
[flang][cuda] Add compiler generated global to unified register global (#221135)
Treat compiler generated global the same way as other in unified mode.
Host has the initializer body and the device side is just a declaration.
[mlir][openacc] Handle compiler generated global for unified mode (#221136)
Treat compiler generated global the same way as other global in unified
mode. This avoid having a host and device copy for runtime information
like type descriptors.
Log a preformatted message from the hardware entitlement script
This commit makes some changes where the script's outcome record was a JSON document whose schema was restated on the reading side, even though the file has exactly one consumer and that consumer deletes it on first boot. It now writes a single preformatted line, only when something actually failed, and middleware logs it verbatim.
Dropping the benign outcomes leaves the unknown-chassis, Mini and ineligible-platform branches doing nothing but returning, and the allowlist check already rejects all three, so they collapse into it.
(cherry picked from commit 4cef70e260a0bc85d5eed409ceb6d4d8bbef9e60)
Record what the hardware entitlement script did on upgrade
This commit adds changes to leave a record under /data of every outcome from truenas-hw-license.py, since the installer discards the script's output and a failure to write the entitlement record was previously invisible. Middleware relays it into middlewared.log on first boot and then deletes it, and only says anything when the record carries an error.
Every outcome is recorded rather than just the failures because a chassis reading as unknown is indistinguishable in the script from dmidecode having failed, so which outcomes deserve attention is better decided in middleware.
Both writes now go through atomic_write instead of a hand-rolled open with fchmod and fchown, matching truenas-nvdimm.py which already uses it from the same chroot. That also closes a window where a failed write left behind a permanent zero-byte /data/license that no later upgrade would have retried.
(cherry picked from commit 9b62f94dbf19ac7f46647e4316be89ef85395825)
Distinguish system-generated license records from issued ones
This commit adds changes to record where a license record came from, since we now write one ourselves during upgrade on unlicensed appliance hardware and several consumers were treating it as though iX had issued it.
Entitlement resolution deliberately ignores the origin - a system-generated record is meant to resolve exactly as an issued one does. This only changes alerting, the unlicensed to licensed transition hook, and what we report outward to TrueNAS Connect and support.
(cherry picked from commit c677fe372fa16ece76e6abb51a39e0912e5afe3d)
Require an explicit origin on every license record
This commit adds changes to drop the default on LicenseInfo.origin so every construction site has to state whether the record was issued or system-generated, instead of the daemon path inheriting ISSUED by omission.
The test factory in pytest/unit/entitlements.py takes origin as a parameter rather than hardcoding it, so a SYSTEM_GENERATED license can be constructed at all - it currently has no coverage anywhere. A side effect is that the legacy-parse and from_license_status equality assertions now genuinely pin origin, where before both sides of the comparison inherited the same default.
(cherry picked from commit 65d699a13b59bae8af6f07d8687cfa457ae41e24)
Write a legacy license record on unlicensed iX appliances
This commit adds changes to write a minimal legacy license record during upgrade on iX appliance hardware that carries no license at all, so those systems resolve entitlements as licensed hardware and future features have somewhere to be gated. Which features the record actually carries is deliberately minimal for now and a separate decision.
The record is stamped with a marker in customer_key so legacy normalization can tell it apart from a license an issuer signed, and it carries an empty HA serial so the parsed type stays ENTERPRISE_SINGLE and failover.licensed remains false.
(cherry picked from commit 0df55557ed90e72fe940330102d8ba7a0d609c06)
NAS-143111 / 26.0.0 / Write a hardware entitlement record on unlicensed iX appliances (#19643)
This PR adds changes to give an iX appliance that shipped without a
license a minimal legacy license record during upgrade, written by a new
script that runs chrooted in the new boot environment. The record is
stamped with a marker in customer_key, and parse_legacy_license grants
it exactly what bare appliance hardware already gives rather than
everything a legacy license implies. SED is the motivating case, since
its vector moves to hardware plus key later and these machines would
otherwise lose it.
LicenseInfo grows an origin field so we can tell a record we wrote from
one an issuer signed. Entitlements never read it, since a system
generated record has to resolve exactly as an issued one does; it is
there for the alert source, the unlicensed to licensed hook, TNC, and
support tickets, which all mean "iX issued this".
[Clang][OpenMP] Don't mark outlined parallel region functions norecurse (#218862)
Clang marks every outlined OpenMP region function `norecurse`, in both
`emitOutlinedFunctionPrologue` and
`emitOutlinedFunctionPrologueAggregate`, and
does the same for the GPU parallel wrapper. For a `parallel` region that
is not
true: the body is reached through the function pointer the runtime is
handed, and
if the body opens another parallel region the runtime's parallel entry
is
re-entered while the first call is still live, so the entry and the body
sit in a
call graph cycle. `rpo-function-attrs` propagates the annotation off the
body and
onto the device runtime's parallel entry once internalization makes it
internal,
and a nested parallel region can then be folded away.
[18 lines not shown]
RegisterCoalescer: Remove empty subranges after merging subranges
Merging subranges in joinVirtRegs didn't try to clear empty ranges after
refineSubRanges, manifesting in an assert in overlaps checks later.
Exposed with subregister liveness once LiveIntervals runs before TwoAddress.
Co-authored-by: Claude (Claude-Opus-4.8)
[flang] Enable FP sum reassociation by default (#218746)
Enable Fortran-standard-compliant reassociation within individual REAL
and COMPLEX sum expressions by default at all optimisation levels.
Preserve the explicit positive and negative Flang override flags.
Also enable by default on bbc to match flang.
RFC:
https://discourse.llvm.org/t/rfc-flang-reasssociate-within-real-and-complex-expressions-by-default/91626
Assisted-by: Codex