[CIR] Auto-generate matchAndRewrite for one-to-one CIR-to-LLVM lowerings
When a CIR op specifies a non-empty `llvmOp` field, the lowering
emitter now generates the `matchAndRewrite` body that converts the
result type and forwards all operands to the corresponding LLVM op.
This removes 27 boilerplate lowering patterns from LowerToLLVM.cpp.
Ops needing custom logic (FMaxNumOp/FMinNumOp for FastmathFlags::nsz)
override `llvmOp = ""` to retain hand-written implementations.
Also fixes llvmOp names (TruncOp -> FTruncOp, FloorOp -> FFloorOp)
and adds a diagnostic rejecting conflicting llvmOp + custom constructor.
[TargetLowering] Remove NeedToApplyOffset from prepareSREMEqFold. NFC (#190256)
For a given element, I believe A is only 0 when the divisor is INT_MIN.
The only way for NeedToApplyOffset to be false after processing all
elements, is for all divisors to be INT_MIN. If all divisors are
INT_MIN, then all divisors are a power of 2 and we wouldn't do the
transform.
clang/AMDGPU: Refactor triple adjustments (#190343)
Factor this similar to the ARM case for future
expansion. The difference being -mcpu is treated as
an alias for -mcpu instead of something separately
useful.
I don't understand this mutation of the triple into
spirv64. The only test where this appears to matter
does not use -mcpu. Previously this would only match
for -mcpu, but this would change the behavior to prefer
-march before falling back to -mcpu.
[MLIR][Arith] Fix index_cast/index_castui chain folding to check intermediate width (#189042)
The patterns `IndexCastOfIndexCast` and `IndexCastUIOfIndexCastUI` in
ArithCanonicalization.td incorrectly eliminated a pair of index casts
whenever the outer result type equalled the original source type,
without verifying that the intermediate cast was lossless.
For example, the following was wrong folded to `%arg0`:
%0 = index_castui %arg0 : i64 to index
%1 = index_castui %0 : index to i8 ← truncates to 8 bits
%2 = index_castui %1 : i8 to index ← incorrectly removed
The pattern matched `%1`/`%2` because `i8.to(index)` has the same result
type as `i64.to(index)`, even though the i8 intermediate silently drops
56 bits. The same bug existed for the signed `index_cast` variant.
Fix: move the optimization into the `fold` methods of `IndexCastOp` and
`IndexCastUIOp` with an explicit check that the intermediate type is at
least as wide as the source type (using
[8 lines not shown]
[clang-tidy] Add `AllowExplicitObjectParameters` option to `avoid-capturing-lambda-coroutines` (#182916)
Add an off-by-default `AllowExplicitObjectParameters` option to the
existing `cppcoreguidelines-avoid-capturing-lambda-coroutines` check.
When enabled, lambda coroutines that use C++23 "deducing this" (explicit
object parameter) are not flagged, since captures are moved into the
coroutine frame ([1], [2], [3]). In C++23 mode, the check also provides
fix-it hints to add `this auto` as the first parameter for lambdas that
don't use it.
The option is off by default to match the current C++ Core Guidelines,
which do not yet recognize explicit object parameters as a solution
([4]). Once the guidelines adopt the proposal, the default can be
flipped.
[1]:
https://github.com/scylladb/seastar/blob/master/doc/lambda-coroutine-fiasco.md#solution-c23-and-up
[5 lines not shown]
Pull up following revision(s) (requested by yamt in ticket #241):
etc/etc.amd64/MAKEDEV.conf: revision 1.38
amd64 MAKEDEV: create 8 nvme (nvme0-nvme7) by default
why 8?
- match ld, sd, wd
- my machine has 6 of them
Remove WITHOUT_BZIP2, WITHOUT_BZIP2_SUPPORT
WITHOUT_BZIP2_SUPPORT only affects a single binary, gzip(1); it doesn't
remove bzip2 support from other bits (e.g., libarchive) and there are
no similar options for gzip, xz or zstd.
WITHOUT_BZIP2 has not done anything at all since it was first added
in 2007.
MFC after: never
Discussed on: arch@
Reviewed by: imp, des, adrian, delphij, emaste
Differential Revision: https://reviews.freebsd.org/D56148
Sponsored by: https://www.patreon.com/bsdivy
x11/herbstluftwm: update to 0.9.6
Changes: https://herbstluftwm.org/news.html
Put my full name in MAINTAINER line while there.
from co-maintainer Florian Viehweger
libauditd: Don't build if WITHOUT_AUDIT is set
When WITHOUT_AUDIT is set, nothing is built that uses this library,
so don't build the library. This avoids building the FreeBSD-audit
package when WITHOUT_AUDIT is set.
MFC after: never
Reviewed by: csjp, imp, emaste
Differential Revision: https://reviews.freebsd.org/D56157
Sponsored by: https://www.patreon.com/bsdivy
Pull up following revision(s) (requested by skrll in ticket #250):
tests/lib/libc/setjmp/t_sigstack.c: revision 1.26
lib/libc/compat/arch/arm/gen/compat_setjmp.S: revision 1.7
arm: fix PR/57946 for compat
Make longjmp restore stack first before restoring signal mask for
arm/compat.
arm is fixed.
libsamplerate: Only build when virtual_oss is built
Gate libsamplerate behind MK_CUSE and MK_SOUND, like virtual_oss.
Nothing else uses this library, so there's no point building it
if we aren't building virtual_oss.
This avoids building a useless FreeBSD-sound package containing
only this library when WITHOUT_SOUND is set.
MFC after: 1 week
Reviewed by: christos, emaste
Differential Revision: https://reviews.freebsd.org/D56164
Sponsored by: https://www.patreon.com/bsdivy
Pull up following revision(s) (requested by yamt in ticket #249):
lib/libkvm/kvm_proc.c: revision 1.102
lib/libkvm/kvm_proc.c: revision 1.103
lib/libkvm/kvm_proc.c: revision 1.104
libkvm _kvm_ureadm: remove a redundant check
libkvm _kvm_ureadm: fix anon address calculation
this has been broken since the initial uvm support in 1998.
libkvm _kvm_ureadm: fix an integer overflow
this has been broken since the initial uvm supporT in 1998.
I suppose it was rare to use >2GB swap in that era.
[GlobalISel] Fix UMR in `SwiftErrorValueTracking` (#190273)
Fix issue reported on
https://github.com/llvm/llvm-project/pull/188296#issuecomment-4179103756
`SwiftErrorValueTracking` holds per-function state used by
`IRTranslator`.
On targets where `TargetLowering::supportSwiftError()` is false, (e.g.
wasm) `SwiftErrorValueTracking::setFunction()` exits early.
Historically, that early return happened before clearing per-function
containers, and pointer members (including `SwiftErrorArg`) had no
in-class initialization.
The bad case is a function with a swifterror argument on such a target:
`IRTranslator` uses `SwiftError.getFunctionArg()` without checking
`supportSwiftError()` and this could read an uninitialized
`SwiftErrorArg` value. (SelectionDAG gates the `getFunctionArg` usages
behind `supportSwiftError()`, so it's specific to GlobalISel)
[10 lines not shown]
Pull up following revision(s) (requested by hgutch in ticket #248):
lib/libcurses/addbytes.c: revision 1.71
lib/libcurses/attributes.c: revision 1.37
lib/libcurses/insdelln.c: revision 1.25
lib/libcurses/add_wch.c: revision 1.11
lib/libcurses/touchwin.c: revision 1.36
lib/libcurses/refresh.c: revision 1.131
libcurses: fix wrong NULL guard
Move the NULL guard in _cursesi_waddbytes() out of #ifdef DEBUG .
Delay initialization of all variables that require dereferencing pointers
that might be NULL until after the NULL guards. This is what KNF calls
for anyway.
Fixes PR lib/60153 .
Pull up following revision(s) (requested by mrg in ticket #247):
external/gpl3/gcc.old/dist/gcc/genmatch.cc: revision 1.2
(applied to external/gpl3/gcc/dist/gcc/genmatch.cc)
tools/gcc/gcc-version.mk: revision 1.32 (via patch)
genmatch.cc: bring across several enhancements from mainline GCC.
in my testing this reduces the size of the emitted "gimple-match.cc"
by about 35%, reduces the code section sise about 15%, and reduces
the compile time about 30%. (this file is the largest single compile
for all of GCC.)
this makes it capable of compiling on vax and sparc again, it seems,
where both were already capable for GCC 14 (which in addition to this
set, splits the emitted file into 10 sub parts for compiling both
separately and in parallel.)
(this is part 1, part 2 will be about mergig the split of the output
[25 lines not shown]