LiveVariables: Only visit tracked physical registers
Keep a bitvector of physical registers with a recorded def or use in
the current block. Register mask handling, the end of block scan, and
the per-block reset now only visit those registers instead of every
register. This is significant for targets with many registers, such as
AMDGPU.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
CodeGen: Strip LiveVariables down to dead flag computation
This analysis is dead and there are no more explicit uses. There are still
passes implicitly relying on adjustments of dead flags. Missing dead
flags are added, and implicit-def operands are added for partially dead
physical registers.
The whole pass should be deleted, but it's taking a while to get all the dead
flag changes through the rest of the compiler. As a stop-gap to try to recover
some compile time regression, and avoiding new users appearing, strip the pass
down to only commputing the dead flags.
The main side effect of this is kill flags are no longer made accurate, which
is the source of the test churn.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
LiveVariables: Remove dead live-in handling and Defs plumbing
No physical register is tracked at the start of a block, so handling
the block live-ins was a no-op. The Defs list was only appended for
instruction defs, which runOnInstr already collects.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[mlir][vector] Account for vector.mask in transfer RAW/WAW checks (#228328)
The transfer RAW/WAW checks only consider mask operands and treat an
operation nested in vector.mask as unmasked. This can remove a prior
tensor write, fold a tensor read to the stored vector, or forward a
stored vector to a memref read. In each case, the IR remains valid but
the masked-off lanes get the wrong values.
Bail out of RAW checks when either operation is region-masked, and out
of WAW when the later write is region-masked. Apply the same read check
to TransferReadAfterWriteToBroadcast.
kmodtool: use kABI-baseline naming on RHEL to prevent kmod accumulation
On RHEL, errata kernels within a minor release share a stable kABI.
The existing kmodtool generates a unique kmod package name per exact
kernel version (e.g. kmod-zfs-5.14.0-687.52.1.el9_8), which causes
unbounded kmod package accumulation as new errata kernels are installed
and akmods rebuilds for each one.
Port the kABI-aware naming logic from RPM Fusion's kmodtool:
- Add init_kernel_uname_r_vars() to parse kernel uname -r into
components including the kABI baseline (kernel_uname_r_short).
Example: 5.14.0-687.52.1.el9_8.x86_64 -> 5.14.0-687.el9_8
- On RHEL (%{?rhel}), use kernel_uname_r_short in package names
so all errata kernels within a minor release produce the same
package name (e.g. kmod-zfs-5.14.0-687.el9_8).
- On Fedora (no kABI guarantee), keep the full kernel_uname_r in
[15 lines not shown]
kmodtool: use kABI-baseline naming on RHEL to prevent kmod accumulation
On RHEL, errata kernels within a minor release share a stable kABI.
The existing kmodtool generates a unique kmod package name per exact
kernel version (e.g. kmod-zfs-5.14.0-687.52.1.el9_8), which causes
unbounded kmod package accumulation as new errata kernels are installed
and akmods rebuilds for each one.
Port the kABI-aware naming logic from RPM Fusion's kmodtool:
- Add init_kernel_uname_r_vars() to parse kernel uname -r into
components including the kABI baseline (kernel_uname_r_short).
Example: 5.14.0-687.52.1.el9_8.x86_64 -> 5.14.0-687.el9_8
- On RHEL (%{?rhel}), use kernel_uname_r_short in package names
so all errata kernels within a minor release produce the same
package name (e.g. kmod-zfs-5.14.0-687.el9_8).
- On Fedora (no kABI guarantee), keep the full kernel_uname_r in
[15 lines not shown]
kmodtool: use kABI-baseline naming on RHEL to prevent kmod accumulation
On RHEL, errata kernels within a minor release share a stable kABI.
The existing kmodtool generates a unique kmod package name per exact
kernel version (e.g. kmod-zfs-5.14.0-687.52.1.el9_8), which causes
unbounded kmod package accumulation as new errata kernels are installed
and akmods rebuilds for each one.
Port the kABI-aware naming logic from RPM Fusion's kmodtool:
- Add init_kernel_uname_r_vars() to parse kernel uname -r into
components including the kABI baseline (kernel_uname_r_short).
Example: 5.14.0-687.52.1.el9_8.x86_64 -> 5.14.0-687.el9_8
- On RHEL (%{?rhel}), use kernel_uname_r_short in package names
so all errata kernels within a minor release produce the same
package name (e.g. kmod-zfs-5.14.0-687.el9_8).
- On Fedora (no kABI guarantee), keep the full kernel_uname_r in
[15 lines not shown]
[Hexagon] Translate 6 more IEEE HVX intrinsics to QFloat (#227779)
Extend translateIEEEIntrinsicToQFloat to cover six more HVX IEEE
intrinsics on v79 and above, taking the count from 22 to 28:
V6_vcvt_hf_sf V6_vcvt_hf_b V6_vdmpy_sf_hf
V6_vcvt_hf_uh V6_vcvt_hf_ub V6_vdmpy_sf_hf_acc
The conversions either widen through qf32 or go through the integer
pipeline with unpack/pack, then convert back to hf with vconv. vdmpy
becomes a qf32 multiply followed by a qf32 add of the two halves; the
accumulating form folds in the incoming sf accumulator with
vadd_qf32_mix.
The zero vector these sequences need is materialized with V6_vd0 instead
of a vsplat of 0, so no scalar register is tied up producing it.
isIEEEHVXIntrinsic only lists intrinsics that have a real translation.
The remaining IEEE intrinsics keep falling through to normal selection
[6 lines not shown]
Revert "[Flang][HLFIR] Lower PACK(array, .TRUE.) to hlfir.reshape (#220860)" (#230219)
This reverts commit 917ea7696fd63fa1c0764d2905fcf3f62dc75919 and
"[flang][NFC] Update PACK simplification test for RESHAPE overflow flags
(#230076)" / fb2a5266d9afbbd1ac2f41a75bcda1b27eb51097 which updated a
test case as a result of the change.
Since this change 2 Fortran tests are failing on our AArch64 buildbots.
char_length_8.f90 and intrinsic_pack.f90.
https://lab.llvm.org/buildbot/#/builders/41/builds/13257
Both producing this when flang attempts to compile them:
unsupported integer type
UNREACHABLE executed at
/home/davspi01/llvm-project/flang/lib/Optimizer/Dialect/FIRType.cpp:526!
[X86] Move CRC32 const folding from instcombine to ConstantFolding (#230106)
Initially this was implemented inside instcombine but during AArch64
implementation it was suggested to move to ConstantFolding.
Additionally added a function parameter in the x86-crc32-demanded.ll
test to avoid const folding.
[X86] Move CRC32 const folding from instcombine to ConstantFolding (#230106)
Initially this was implemented inside instcombine but during AArch64
implementation it was suggested to move to ConstantFolding.
Additionally added a function parameter in the x86-crc32-demanded.ll
test to avoid const folding.
[NVPTX] Generalize register-or-immediate operands for integer instructions (#229920)
Extend the register-or-immediate operands to integer instructions and
intrinsics. This removes separate register/immediate instruction
variants and their selection patterns, and allows constants in
additional source operand positions.