[mlir] Make the Python binding type casters well-formed under C++23 (#208093)
The nanobind type/attr/loc/value casters in IRCore.h return a by-value
PyType/PyAttribute/PyLocation/PyValue as their DerivedTy result.
Under pre-C++23 rules, this was a rvalue that would decay to a lvalue
when passed to the DerivedTy constructor.
Under C++23's P2266 (implicit move on return), that return operand is an
xvalue, which cannot bind the PyConcrete* constructors that take a
non-const lvalue reference.
This patch constructs the derived type explicitly (return
DerivedTy(arg);) using the lvalue constructor; this preserves the
pre-C++23 behavior on C++23 builds.
[SandboxVec][Scheduler][NFC] Cleanup: Use interval in loop and reset sched state (#205465)
Replace the for loop that iterates between TopI and LowestI with a range
loop over ResetIntvl and move the reset of the scheduling state to this
loop.
We iterate over the loop in the reverse order than before but the
functionality should not change.
[SBVec] Implement topDown/botUp vectorizers in unison
This patch introduces the `top-down-vec` pass to the Sandbox Vectorizer,
adding the ability to traverse use-def chains top-down to discover and
collect vectorization opportunities. Furthermore, this patch unifies
the two vectorizers into a single implementation to minimize code
duplication.
* vectorize in the same direction as the scheduler direction
* use AuxArg to determine vectorizer direction
* move user collection to VecUtils and add unit tests
* handle legality results
* introduce getNextBundles to loop ovop over getNextBundle calls for each user
* introduce BundleTy and GetOpIdxVec
[RISCV][MCA] Avoid deriving EMUL without SEW (#207986)
When only an LMUL instrument is active, SEW is unavailable. Avoid
deriving EMUL for vector memory instructions in that case and fall back
to the base scheduling class.
Closes #170118.
[clang-repl] Avoid use `$LD_LIBRARY_PATH` in lit tests (#208170)
Strengthen clang-repl lit tests by Avoid use `$LD_LIBRARY_PATH`. The
lit's internal shell does not expand shell variables such as
`$LD_LIBRARY_PATH`, so provide the current value as a lit substitution.
This PR can fix the following failures when user build llvm with
non-system C++ standard library.
```
# executed command: env 'LD_LIBRARY_PATH=<build dir>/tools/clang/test/Interpreter/Output/cxx20-modules.cppm.tmp:$LD_LIBRARY_PATH' <build dir>/bin/clang-repl -Xcc=-std=c++20 -Xcc=-fmodule-file=M=<build dir>/tools/clang/test/Interpreter/Output/cxx20-modules.cppm.tmp/mod.pcm -Xcc=--target=x86_64-linux-gnu
# .---command stderr------------
# | <build dir>/bin/clang-repl: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by <build dir>/bin/clang-repl)
# | <build dir>/bin/clang-repl: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by <build dir>/bin/clang-repl)
# | <build dir>/bin/clang-repl: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by <build dir>/bin/clang-repl)
# | <build dir>/bin/clang-repl: /lib64/libstdc++.so.6: version `CXXABI_1.3.13' not found (required by <build dir>/bin/clang-repl)
# `-----------------------------
```
Signed-off-by: yronglin <yronglin777 at gmail.com>
[SBVec] Implement topDown/botUp vectorizers in unison
This patch introduces the `top-down-vec` pass to the Sandbox Vectorizer,
adding the ability to traverse use-def chains top-down to discover and
collect vectorization opportunities. Furthermore, this patch unifies
the two vectorizers into a single implementation to minimize code
duplication.
* vectorize in the same direction as the scheduler direction
* use AuxArg to determine vectorizer direction
* move user collection to VecUtils and add unit tests
* handle legality results
* introduce getNextBundles to loop ovop over getNextBundle calls for each user
* introduce BundleTy and GetOpIdxVec
fwisound: add Apple FireWire audio driver
Expose audio capture from Apple FireWire devices as a standard
pcm(4)/dsp(4) device via the newpcm framework.
(adrian: I've tested this on an isight camera and looped
it back to USB speakers via "sox -t oss /dev/dsp3 -t oss /dev/dsp4")
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D58109
fwcam: retry ISO enable after re-powering camera
Some IIDC cameras power down the sensor when inactive (e.g. lens
cover closed) and reject ISO enable with EIO. Re-power the camera
and retry once before failing.
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D58101
fwcam: defer ISO streaming to first read
Moved ISO start to first usage. Opening the device now
only validates state and increments the open count, allowing info
queries and mode changes without starting the camera. ISO streaming
begins on demand when userland first reads frame data.
This avoid the camera led to turn-on at attach.
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D58100
[SampleProfile] Introduce SampleProfileNameSet (NFC) (#208114)
This patch introduces a helper class SampleProfileNameSet to
encapsulate the construction of the name set and provide a contains
method.
I'm planning to speed up the membership queries into the name table.
With this patch, changes to the underlying data structure won't affect
use sites.
Assisted-by: Antigravity
[ProfileData] Support format version 104 for extensible binary sample profiles (#206297)
This patch adds initial support for format version 104 in extensible
binary sample profiles to support the upcoming on-disk hash table.
This patch sets up the versioning scheme in the reader and writer as a
preparation step without actually introducing the on-disk hash table.
The reader is updated to support format version 104. The writer can
now write format version 104 profiles when requested via
-sample-profile-format-version, but continues to default to version
103 as version 104 is a work in progress. We plan to promote the
default version to 104 once the on-disk hash table support is fully
integrated in a subsequent patch.
RFC:
https://discourse.llvm.org/t/rfc-faster-sample-profile-loading/90957/4
Assisted-by: Antigravity
Give each mlir::Block a stable ID within its parent region (#207617)
Assign each mlir::Block a stable ID within its parent region, mirroring
llvm::BasicBlock/llvm::Function (called ID, not number, since a block/op
number denotes position in MLIR): Block gains getBlockID() and reads -1u
while it has no parent region; Region gains nextBlockID with
getMaxBlockID() and getBlockIDEpoch(); the block ilist traits assign the
ID on add/transfer and invalidate it on removal; and
GraphTraits<mlir::Block*>/<mlir::Region*> expose
getNumber/getMaxNumber/getNumberEpoch. This makes
GraphHasNodeNumbers<mlir::Block*> true, moving MLIR's CFGLoopInfo and
dominator tree onto the number-indexed path. MLIR never renumbers
blocks,
so the epoch is a fixed 0.
Prerequisite for requiring GraphHasNodeNumbers in llvm::LoopInfoBase and
dropping its DenseMap fallback.
Aided by Claude Opus 4.8
Verify signal delivery preserves various FPU state.
Should also test AVX512 but I'm not sure I have hardware handy to do
this right now and qemu doesn't emulate it, as far as I know! TBD.
(Plus: there's umpteen different cpuid feature bits to consider,
annoyingly, and that means a lot of manual reading to sort through
them.)
PR kern/60426: Signal handler corrupts AVX (YMM) registers