20 years ago when the 1-Wire infrastructure was ported over from
OpenBSD, the calls in the onewire_detach() function in the onewirebus
(sys/dev/onewire/onewire.c) code for config_detach_children() was
commented out. I don't know why this was done, exactly, as there
wasn't any particular comments present. I suspect it might have been
because owtemp, the common end device, could not detach or maybe
detaching just didn't work as expected at that time.
The string of devices are as follows:
End controller -> onewirebus -> End device
gpioow or ds2482ow -> -> such as owtemp or ds24e17iic
If the onewirebus does not call config_detach_children(), the end
devices will end up orphened and not detach if the controller is
unloaded, such as with modunload. In a DIAGNOSTIC kernel, you will
panic with a complaint about the end device still being present.
[6 lines not shown]
[libc][stdfix] Implement expuhk and expuk functions (#240631)
Implement `expuhk` and `expuk` functions with unit tests.
```c
unsigned short accum expuhk(unsigned short accum);
unsigned accum expuk(unsigned accum);
```
[MLIR][Vector] Fix ShapeCastBroadcastFolder when shape_cast changes non-unit dim strides (#227574)
### Summary
`ShapeCastBroadcastFolder` previously checked whether
`vector.shape_cast(vector.broadcast)` could be folded into a single
`vector.broadcast` by comparing the scalar product of stretched unit
dimensions (`getBroadcastStretchingFactor`).
However, a single scalar product is insufficient when `srcShape` has
multiple unit dimensions across different sides of a non-unit dimension,
and the `shape_cast` shifts the broadcast factor from an inner unit
dimension to an outer unit dimension.
For example:
```mlir
%0 = vector.broadcast %arg0 : vector<1x4x1xf32> to vector<1x4x4xf32>
%1 = vector.shape_cast %0 : vector<1x4x4xf32> to vector<4x4x1xf32>
```
[26 lines not shown]
[clang-tidy] Fix false negative for binary logical expressions for tw… (#230846)
Fixes #230601
This PR addresses the false-negative scenario where
`bugprone-redundant-branch-condition` fails to trigger on simple
two-variable logical conjunction expressions (e.g., `if (x && y) { if
(y) ... }`).
Note: This is a partial fix. As noted in the code's `// FIXME` comments,
handling longer conjunctive and disjunctive chain clauses (3 or more
variables) requires further extension is not yet touched.
---------
Co-authored-by: EugeneZelenko <eugene.zelenko at gmail.com>
Co-authored-by: Zeyi Xu <zeyi2 at nekoarch.cc>
[llvm-dwarfdump] Fix --error-display=summary and --error-display=quiet (#234308)
Before the patch `--error-display=summary` printed every error in detail
and no summary, and `--error-display=quiet` printed the aggregated
summary.
This patch adds `DIDumpOptions::ShowErrorDetails` to control per-error
output, and make `DIDumpOptions::ShowAggregateErrors` switch only the
"Aggregated error counts" summary. `DIDumpOptions::ShowErrorDetails`
defaults to true, so other DWARFVerifier users keep printing details.
Verbose no longer affects which verifier output is printed.
`llvm-dwarfdump --verify` sets `Verbose = true` unconditionally again,
and it only selects the format of the DIEs dumped in error details.
The duplicate .debug_line file name warning, which was gated on Verbose
to keep it out of the summary and quiet modes, is now gated on
ShowErrorDetails. As a consequence, dsymutil, DWARFLinker and
llvm-dwarfutil, which verify with default options, report this warning
[2 lines not shown]
math/R-cran-corpcor: New port: Efficient estimation of covariance and partial correlation
Implements a James-Stein-type shrinkage estimator for the covariance
matrix, with separate shrinkage for variances and correlations. The
approach is both computationally as well as statistically very efficient,
it is applicable to "small n, large p" data, and always returns a positive
definite and well-conditioned covariance matrix. In addition to inferring
the covariance matrix the package also provides shrinkage estimators for
partial correlations and partial variances. The inverse of the covariance
and correlation matrix can be efficiently computed, as well as any
arbitrary power of the shrinkage correlation matrix. Furthermore,
functions are available for fast singular value decomposition, for
computing the pseudoinverse, and for checking the rank and positive
definiteness of a matrix.
PR: 296812
Approved by: jrm (mentor)
Differential Revision: https://reviews.freebsd.org/D61259
math/R-cran-ranger: New port: Fast implementation of random forests
Fast implementation of Random Forests for classification, regression,
survival and probability prediction, suited for high dimensional data.
Approved by: jrm (mentor)
Differential Revision: https://reviews.freebsd.org/D61244
[Offload][AMDGPU] Return the real user count from getUserCount
This patch fixes the return type of AMDGPUQueueTy::getUserCount, which
currently returns bool: that collapses the count to 0 or 1, which upsets
the occupancy measurement in assignNextQueue.
A new test checks that work is queued appropriately across hardware
queues.
Assisted-By: Claude
[Offload][AMDGPU] Return the HSA queue as a queue's native handle
Implement getNativeQueueHandle (introduced by #234186) for AMDGPU, so
that olGetQueueInfo can report OL_QUEUE_INFO_NATIVE_HANDLE for an AMDGPU
queue instead of UNSUPPORTED. The handle is the hsa_queue_t the queue's
stream is bound to; a stream is bound on first use, so querying binds
one if necessary. Several streams may share an HSA queue, in which case
their queues report the same handle.
Assisted-By: Claude
[LV] Allow targets to filter which types maximize bandwidth (#234642)
The motivation for this is to avoid maximizing bandwidth for `i1`s on
AArch64.
On AArch64, `i1` is a legal SVE predicate element type, but data vectors
require wider types.
Treating `i1` like any other element type in
`getSmallestAndWidestTypes()` can cause the maximize-vector-bandwidth
heuristic to select excessively large VFs based on the width of `i1`
vectors.
This is undesirable because predicate vectors are normally produced or
consumed alongside data vectors, and their legal width for such
operations matches that of the data vectors. Selecting wider predicate
vectors introduces unnecessary predicate unpacking and increases vector
register pressure.
[5 lines not shown]
icu: update to 79.1.
ICU 79 updates to Unicode 18 (blog), including new characters and
scripts, emoji, collation & IDNA changes, and corresponding APIs
and implementations.
It also updates to CLDR 49 (blog) locale data with many additions
and corrections.
Line break backwards-iteration performance has been significantly
improved, fixing a long-standing regression.
C++ and Java implementations of the CLDR MessageFormat 2.0
specification have been updated to CLDR 49. Some of the API remains
in technology preview.
ICU 79 and CLDR 49 are major releases, including a new version of
Unicode and major locale data improvements.
[SPIRV] Select the correct `OpSelect` pseudo when dealing with untyped pointers (#240652)
We were not selecting the right flavour of `OpSelect` due to not
checking for `OpTypeUntypedPointerKHR` operands. This also exposed the
fact we were not always setting the correct register class. The patch
fixes both of these correlated issues.
[AMDGPU][AsmParser] Split the MTBUF formats into modifiers and regular operands
This eliminates the hacks parsing formats together with soffsets
that may follow them and printing them in printRegularOperand()
instead of using the custom printer as usual.
The legacy forms are supported as aliases using the
regular-operand formats.
Assisted-By: Claude