[Coroutines][NFC] Extract getFirstNonZeroLocAfterSuspend from updateScopeLine (#231197)
The search for the first instruction with a non-zero line after a
suspend point will also be used to compute the debug location of the
async context projection in resume functions.
Fix build failure after f02a5391295e
On main, casting PHYS_TO_DMAP(pa) does not require casting to pt_entry_t
* because it returns void * after fe3e92e6868d ("PHYS_TO_DMAP: Return a
void * instead of a vm_offset_t"). That was not MFCed to stable/14 and
stable/15, thus cast the return value of PHYS_TO_DMAP(pa) to
pt_entry_t * to fix build failure.
Approved by: jhb (mentor)
Fixes: f02a5391295e ("powerpc/radix: include page tables...")
Sponsored by: FreeBSD Foundation
[InstCombine] Reassociate commutative binops over select/phi/minmax (#187493)
Fixes #187057
See alive2 test cases: https://alive2.llvm.org/ce/z/DvR-oV. Tests with
larger bit widths and without "--disable-undef-input" were verified
locally. Nits appreciated.
Consider "symmetric pair" folds like `min(x,y) + max(x,y) -> x + y` and
`select(c,x,y) & select(c,y,x) -> x & y`. We don't currently fold these
over association boundaries. This patch adds some reassociations for
these.
[AMDGPU] Reinstate AMDGPUPALMetadata::setFromBlob()
d55fca44d4bb and 7b0397aaf568 removed it, but amdgpu-dis depends
on it to load PAL metadate from .note records.
Add a comment saying the function is used out of tree to prevent
removing it again.
aq: Use the common RSS key without options RSS
Fetch the common RSS key independently of options RSS instead of
generating a private key in non-RSS kernels. Keep the existing
software-RSS or round-robin indirection policy and hardware key
serialization unchanged.
Reviewed by: gallatin
MFC after: 2 weeks
Sponsored by: BBOX.io
Differential Revision: https://reviews.freebsd.org/D59793
(cherry picked from commit 772994d7748287be70fe850ec9e1117d4e7b1747)
aq: Report partial initialization failures to iflib
Stop initialization when hardware setup, ring initialization/start, or
datapath start fails. Run the existing best-effort stop/cache/reset
cleanup and report the failure through iflib_init_failed(). Do not keep
configuring later rings or publish the interface as running.
Reviewed by: nprice
MFC after: 2 weeks
Sponsored by: BBOX.io
Differential Revision: https://reviews.freebsd.org/D59853
(cherry picked from commit 050683bb8e136981e4a1f66e845ab05c135630f4)
aq: Invalidate the descriptor cache after stopping all rings
Atlantic controllers can retain receive descriptors and their data
addresses after their rings are disabled. Reusing or releasing those
mappings without invalidating the device cache has caused observed
IOMMU and SMMU faults in the referenced Linux reports (7a1bb49461b1,
ed4d81c4b3f2 and 7526183cfdbe).
Move global cache invalidation out of the per-ring stop routine. Disable
every ring first, toggle invalidation once, and wait for its completion
indication. Exclude Atlantic A0, as in the upstream workaround. Report
a completion timeout rather than silently discarding it.
Reviewed by: nprice
MFC after: 2 weeks
Sponsored by: BBOX.io
Differential Revision: https://reviews.freebsd.org/D59852
(cherry picked from commit 4993c1052f899b9a971815df5661ca241641ad8e)
[Clang] [NFC] Add `FunctionDecl::getNumParamsIncludingThis()` (#230675)
There are currently a few places where we need to get the number of
parameters a function has + the `this` parameter, but only if it's not
an explicit object parameter (as that one is already included in the
normal parameter count). This is a bit clunky to write, so this patch
adds a helper you can call for that.
Sema sometimes calls `getFunctionOrMethodNumParams()` instead, which
handles more than just `FunctionDecl`s, so this updates that helper as
well.
Assisted-by: Codex
[X86] Fold compares of widened vectors into masked compares (#228350)
Part of #226389
Masked compares are only matched from an `and` that has the same mask
type as the compare. When the compared vectors have to be widened, e.g.
`<2 x float>` to `v4f32`, the compare gives a `v4i1` and the `v2i1`
`and` only sees it through an `extract_subvector`. The same shape shows
up with legal types too, because DAGCombiner narrows an `and` when only
its low elements are used. Either way nothing matched, and we ended up
with separate compares and a chain of `kandw` instead of `vcmpltps ...
%k1 {%k1}`.
`PreprocessISelDAG` now widens such an `and` to the type of the compare
and takes the low elements of the result, so the existing patterns do
the rest. It has to happen there rather than in a DAG combine, since
`narrowExtractedVectorBinOp` would narrow the `and` right back. An `and`
that already has a compare of its own type as an operand is left alone:
`isel` can fold that one, and it is what tells us the upper mask bits
are zero.
mgb: Propagate DMA setup errors and use the requested channel
Check the receive DMA and frame transfer setup results that were
previously discarded. Return EINVAL for invalid ring/writeback addresses
rather than reporting success, and stop initialization through
iflib_init_failed() when a ring could not be configured.
Use the transmit queue count for transmit initialization and the supplied
channel index for DMA operations. The driver currently allocates one
queue in each direction, so those index/count corrections are latent.
MFC after: 2 weeks
Sponsored by: BBOX.io
(cherry picked from commit 3f6c1e731376ffaf8612e7e196119acabbf357e4)
mgb: Correct TX interrupt bit
The TX interrupt handler checked MGB_INTR_STS_RX(qidx) instead of
MGB_INTR_STS_TX(qidx) -- presumably a copy-paste issue.
Because the driver does not use TX interrupts so there was no actual
issue in practice.
Reviewed by: adrian
Sponsored by: The FreeBSD Foundation
Fixes: 8890ab7758b8 ("Introduce if_mgb driver for Microchip LAN743x PCIe NIC")
Differential Revision: https://reviews.freebsd.org/D60550
(cherry picked from commit 6c3f2b8be268de075d60387158f2889140851725)
[AArch64][GlobalISel] Ignore debug uses in mul-constant combine (#228100)
This PR is intended for the issue #227648.
When checking whether a multiply has a single non-debug use, retrieve
that use using the non-debug use iterator as well. Otherwise a DBG_VALUE
can get selected instead of the actual arithmetic user, causing debug
info to change the combine decision.
So, my fix is as follows:
1. Use the non-debug instruction iterator, `use_nodbg_instructions()`,
when retrieving the user so that it matches the preceding
`hasOneNonDBGUse()` check.
2. Added a MIR regression test covering a `G_MUL` with a `DBG_VALUE` use
and a single non-debug `G_ADD` user.
I added the regression test in the file:
[21 lines not shown]
[libsycl] Add handler counterparts to queue USM API (#230101)
Add prefetch, fill and memset handler member functions. Extend tests to
cover those as well as handler::memcpy.