[OMPIRBuilder] Don't leak a foreign debug loc into the taskwait call (#222586)
A kmp_depend_info array is hoisted to the entry block of the enclosing
function. Pointing the builder into that block also adopts the location
of what is already there, which belongs to whichever construct put it
there rather than to the construct being emitted. restoreIP does not put
the location back either, since it adopts the location of the
instruction it lands on, so in createTaskwait the leak outlives the
excursion and reaches the __kmpc_omp_taskwait_deps_51 call.
Use InsertPointGuard, which restores the location along with the
insertion point.
Fixes https://github.com/llvm/llvm-project/issues/222044
Co-authored-by: Cursor <cursoragent at cursor.com>
[libc++] Make _LIBCPP_PROVIDES_DEFAULT_RUNE_TABLE part of the locale base API (#219196)
Whether libc++ has to provide a rune table is really part of the
localization of a platform. Move it there instead of `<__config>`.
NAS-143512 / 26.0.0 / Gate S3 auditing on appliance hardware (#19668)
This commit adds changes to decide whether the S3 service audits
requests from the hardware class rather than from the license, so it
matches the gate the kernel audit handler already uses -- both halves of
the audit trail land in the same database, so both have to answer to the
same thing. The check is renamed audit_supported since it no longer
reads a license, and the validation messages and API field descriptions
say appliance hardware instead of Enterprise license.
NAS-143512 / 27.0.0-BETA.1 / Gate S3 auditing on appliance hardware (#19668)
This commit adds changes to decide whether the S3 service audits
requests from the hardware class rather than from the license, so it
matches the gate the kernel audit handler already uses -- both halves of
the audit trail land in the same database, so both have to answer to the
same thing. The check is renamed audit_supported since it no longer
reads a license, and the validation messages and API field descriptions
say appliance hardware instead of Enterprise license.
DAG: Materialize a directly-lowered gc.relocate in its own block
Fixes machine verifier errors with -early-live-intervals.
A NoRelocate statepoint value is a directly-lowered leaf value. When its
gc.relocate is in another block, it was made available by exporting it from the
statepoint's block. For an invoke this defines the vreg after the call, which
does not dominate the use reached along the unwind edge, giving an invalid live
range (or a silent read of an undefined register without -verify-machineinstrs).
Since the leaf has no chain or operands, rematerialize it at the gc.relocate
instead of exporting it. undef already rematerializes there. A gc.relocate
value is always a pointer, so only the integer-constant and frame-index leaves
are handled.
Co-authored-by: Claude (Claude-Opus-4.8)
[BOLT] Fixed BOLT edge weight estimation in non-LBR mode. (#222538)
Before: When estimating edge weights within `computeEdgeWeights` in
`MCF.cpp`, if the `TotalChildrenCount` is 0, the default edge weight is
`1 / (GraphT::child_end(BB)_ - GraphT::child_begin(BB))` resulting in
integer division and incorrect distribution of estimated edge weights.
After: Correctly estimate edge weights with zero and non-zero values of
`TotalChildrenCount` by enforcing floating point division.
---------
Co-authored-by: Thrrreeee <shijinrui at bytedance.com>
net: Add ifmedia support for 10GBase-BX BiDi
10GBase-BX uses paired wavelengths to carry both directions over a
single strand of single-mode fiber. The optics must be paired so that
the transmit and receive wavelengths cross over.
(cherry picked from commit 4220b52453c9701922955dcc1c1e1554d6a9f3ae)
[VPlan] Narrow VPWidenGEPRecipe if only its first lane is used. (#221171)
Extend existing narrowing in legalizeAndOptimizeInductions, already
applied to VPReplicateRecipe and VPWidenRecipe, to VPWidenGEPRecipe as
well. This improves cases where an interleaved access's insert position
shares an address calculation with a strided access (see
RISCV/interleaved-load-masked-store.ll), which previously caused the
legacy cost model to classify the address as non-uniform.
iflib: Remove an unused field from struct iflib_rxq
Reported by: Alexander Sideropoulos <Alexander.Sideropoulos at netapp.com>
MFC after: 1 week
(cherry picked from commit fc09c7fee23b3cf3ddc95105ef6ef41d7956232f)
[SLP] Limit second pass to register VF in vectorizeNonVectorizableInsts. (#222755)
The second tryToVectorizeList pass in vectorizeNonVectorizableInsts
would try all roots for each possible VF between 1 and the number of
entries in the list.
This can cause super-linear compile-time, for example when there are
basic blocks with calls taking a large number of loads as arguments.
For example, running SLPVectorizer on a block with 1024 loads passed to
calls (https://llvm.godbolt.org/z/8M53G6WzW) will take a large amount of
time (timeout on godbolt, locally on Apple M1 it takes ~30s). With the
fix, it only takes 0.01s.
On large IR corpus, I did not see any difference in vectorization
decisions on AArch64.
PR: https://github.com/llvm/llvm-project/pull/222755
iflib: Permit SR-IOV configuration on a down interface
Drivers which remap PF queues need a stop/mutate/restart transaction
only when the interface has live queues. Permit their IOV
initialization callback while the interface is administratively down
and leave it down afterward.
This restores the standard boot-time iovctl.conf workflow and
lets other opt-in drivers configure VFs before netif brings the PF up.
(cherry picked from commit 2cf580c694f6f392531a63f01c3fb89c0244f89a)
iflib: Add restart transactions for IOV reconfiguration
Some devices remap the PF queues when entering or leaving SR-IOV. Add
opt-in PCI IOV helpers that hold the iflib context lock across the
complete stop, driver callback, and restart transaction.
Existing drivers continue to use the non-restarting helpers.
Sponsored by: BBOX.io
(cherry picked from commit f8fa2d77bc305bec519f9f02afe211e903c57573)
[flang] Do not hoist fir.field_index out of loops
Lowering a consumer of a !fir.field value inspects its defining operation:
for a record whose layout is known at compile time the field becomes an LLVM
GEP struct index, which must be a constant, and otherwise the `field`
attribute is read off the defining op. A field value therefore may not be a
block argument.
LICM broke that. fir.field_index is Pure and takes no operands, so it is
trivially loop-invariant and was hoisted out of the loop. Lowering emits one
inside each arm of a construct -- for example the CASEs of a SELECT CASE that
each pass a different component of the same derived type as an actual
argument -- so hoisting them left those arms as otherwise-identical blocks
differing only in that operand. Block merging then merged them and threaded
the field through a new block argument, and codegen aborted with "must be a
constant".
Leave producers of a !fir.field where they are. The arms then differ by an
operation rather than by an operand, so they are no longer merge candidates.
[7 lines not shown]
iflib: Initialize the VFLR task unconditionally
The VFLR task was initialized only from drivers MSI-X interrupt
assignment paths. ixl's legacy interrupt handler can nevertheless defer
VFLR work, leaving an uninitialized task. Even with MSI-X, the admin
interrupt was established before the task was initialized.
Initialize it alongside the other private tasks. The existing detach
check and private-taskqueue drains then cover its lifecycle for every
interrupt mode and registration failure.
Sponsored by: BBOX.io
(cherry picked from commit b4208a67edc2eb7898a9ff2a6f3990c6852910e4)
iflib: Add an admin task detach fail point
Add an exact-device fail point immediately after the admin task checks
IFC_IN_DETACH. This makes the detach race reproducible without affecting
another interface.
Use a bounded delay to keep the task active while detach enters the
taskqueue drain. Mark the point nonsleepable as a safety backstop, and
document a one-shot test for verifying that deregistration drains an
already-running task before ether_ifdetach().
Reviewed by: gallatin, kgalazka
Sponsored by: BBOX.io
Differential Revision: https://reviews.freebsd.org/D58720
(cherry picked from commit ac56d36007a5a1a01fe69df370f272060e852e0b)
iflib: Drain configuration tasks before interface detach
iflib_device_deregister() sets IFC_IN_DETACH before removing the
interface, but a task which already passed its detach check can still
report a link change. This can re-arm if_linktask after
ether_ifdetach() has drained it and leave work pending across queue
teardown.
Drain the entire private taskqueue before ether_ifdetach(). Drivers
may register their own link-related configuration tasks there, so
draining only the framework admin task leaves the same race for those
drivers.
Differential Revision: https://reviews.freebsd.org/D58452
Co-authored-by: Andrew Gallatin <gallatin at FreeBSD.org>
Co-authored-by: Kevin Bowling <kbowling at FreeBSD.org>
(cherry picked from commit ba353c8950d575f9d15b82c92658e660935fba25)
iflib: Add registration failure injection points
Add six device-scoped fail(9) points at the registration milestones
needed to exercise each unwind path. An exact, runtime-only device
selector prevents unrelated iflib devices from consuming an armed point.
Mark the points non-sleepable because registration holds the ifnet and
context locks. Document one-shot operation and bus-address reprobe so a
failed attach can be recovered without another kernel build.
Reviewed by: gallatin
Sponsored by: BBOX.io
Differential Revision: https://reviews.freebsd.org/D58722
(cherry picked from commit 90e7dbe5e2ca47baff4e4c6d9e892a0554eec4db)
iflib: Allow conditional LED device support
A driver class may implement LED control even though the capability is
not available on every device or firmware version it supports. Add an
optional capability method and consult it before creating the led(4)
device. Default to supported so existing providers are unchanged.
This will be used by bnxt which blends PF and VF in the same driver.
(cherry picked from commit 2519e19f05e0c3e5925bf81b729b4c28f2ad1af6)
iflib: Create led(4) devices
When a driver implements ifdi_led_func, have the framework create its
led(4) device after attach completes and the ifnet and context locks are
released.
PR: 246885
Reported by: jlduran
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D32389
(cherry picked from commit 6591a7f6919295f2ec2b463d1ae9554a8bbf6104)