[CIR] Annotate AMDGPU printf ops with constant strings before lowering (#242111)
Resolve constant format strings while producers are still CIR, so the
AMDGPU printf lowering does not meet converted producers under one-shot
conversion. This is required work for the one-shot LLVM conversion flip:
record one string per operand on each op and read the annotation in the
lowering, instead of walking producers there.
Direct constants use matchPattern and single widening steps use
CastOp::fold; the cast chain walk stays hand written because CastOp is
not ConstantLike and its fold folds narrowing casts. New tests cover
int-array globals, stale annotations, and a narrowing cast that must not
fold.
[MemCpyOpt][EarliestEscapeAnalysis] Properly invalidate EEA on moves (#238026)
EarliestEscapeAnalysis cache can become stale whenever we move instructions
or introduce new instructions. It can only happen if the newly inserted instruction
can indeed be an escape. In that case, we drop the cache. Arguably, this is a rather
crude solution, but it might be not easy to introduce a solution that tracks which
pointers escape the same way the original analysis does and handles depth cut-offs
conservatively. Moving escape points shouldn't be very frequent to begin with, so
this trivially conservative solution seems to strike a good balance.
Fixes #238018.
net-im/continuwuity: Add New Port
Continuwuity is a Matrix homeserver written in Rust and one of the two
projects continuing conduwuit. It serves the client-server and federation
APIs from a single process and stores its state in RocksDB, linking against
the version from the ports tree.
www: https://continuwuity.org/
Sponsored by: Netzkommune GmbH
net-im/continuwuity: Add New Port
Continuwuity is a Matrix homeserver written in Rust and one of the two
projects continuing conduwuit. It serves the client-server and federation
APIs from a single process and stores its state in RocksDB, linking against
the version from the ports tree.
www: https://continuwuity.org/
Sponsored by: Netzkommune GmbH
[ORC] Avoid -Wlifetime-safety false positive in addGenerator (#242264)
Return the reference from inside the locked lambda instead of binding it
to the moved-from unique_ptr parameter. NFC.
Co-authored-by: Gabor Horvath <gaborh at apple.com>
[Clang][ABI][X86] Fix arg extension incompatibility with platform psABI (#236450)
This resolves a long-standing incompatibility between the argument
passing ABI used by Clang and the platform psABI, primarily for x86-64
SysV targets. The psABI specifies that the caller does not need to
extend small integers, and the callee can make no assumptions about the
high bits. However, Clang instead extended small integers in the caller,
and assumed that the extension is present in the callee.
The platforms affected by this change are:
* x86-32 and x86-64 targets using the SysV ABI, except Darwin and
PlayStation. For Darwin/Playstation, the Clang ABI is now the platform
ABI. (The x86-64 SysV ABI is nowadays very explicit about high bits
being unspecified. On x86-32 SysV this is specified "by omission".)
* x86-32 Windows. I don't believe this has any ABI spec worth
mentioning, but the emergent MSVC behavior seems to be that it performs
extensions in the callee, i.e. does not assume that the high bits are
extended. (This is inherited from the previous version of the patch, so
I'm mostly trusting that it's correct.)
[69 lines not shown]
[RISCV][P-ext] Legalize splat shift amounts during vector lowering (#242996)
Vector legalization can create splat BUILD_VECTOR shift amounts with
illegal scalar operand types. Use `DAG.getSplatValue` with
`LegalTypes=true` to obtain a legal scalar before creating packed shift
nodes.
Fixes #242983
[BOLT][RISCV] Preserve hot fallthrough paths when placing cold jump stubs (#236726)
RISC-V long-jump stubs for cross-fragment edges are currently inserted
immediately after their source blocks, which can interrupt hot
fallthrough paths and force hot execution to branch over cold stubs.
Place stubs for zero-count edges at the end of the source fragment when
the source has a fallthrough successor in the same fragment and a
conservative distance bound fits within the conditional branch range.
This follows BOLT's existing AArch64 strategy of keeping cold
trampolines out of hot paths whenever branch reach permits.
[libc] Move the fork gettid call into a syscall wrapper (#242606)
Move the uncached gettid syscall used by fork() to refresh the child TID
into linux_syscalls::gettid. Register the wrapper in CMake and Bazel.
[DebugInfo] Invalidate debug info of users when an icmp predicate cha… (#238019)
…nges
Fixes https://github.com/llvm/llvm-project/issues/218620
When an `icmp` predicate changes, future calculations using that value
could change. Any debug records relying on the results of those
calculations would then be incorrect.
`CorrelatedValuePropagation` goes through the user chain to see what the
range of values could be, which lets it decide if it can make this
optimisation. This PR changes that so that the debug records of those
users are also collected as it goes through the chain. Then, if the
optimisation is taken, we invalidate those debug records to prevent
incorrect values from being reported.
sound: Remove stale midi module dependencies
midi(4) stopped being a module in 45bb10e0ed5a ("sound: Stop building
midi as a module"), so snd_cmi(4) and snd_emu10k1(4) fail to load
because they still depend on it.
Fixes: 45bb10e0ed5a ("sound: Stop building midi as a module")
Sponsored by: The FreeBSD Foundation
MFC after: 1 day
sound: Remove stale midi module dependencies
midi(4) stopped being a module in 45bb10e0ed5a ("sound: Stop building
midi as a module"), so snd_cmi(4) and snd_emu10k1(4) fail to load
because they still depend on it.
Fixes: 45bb10e0ed5a ("sound: Stop building midi as a module")
Sponsored by: The FreeBSD Foundation
MFC after: 1 day
libm: Implement iseqsig()
C23 adds iseqsig(), the signaling counterpart of ==, which
raises FE_INVALID on any NaN rather than only on signaling
ones (as per §7.12.17.7). The helpers raise it explicitly
instead of relying on relational operators, which the
compiler may emit as quiet comparisons, and the macro
dispatches on float_t so that wider-evaluated arguments
are not narrowed (§F.10.14.1).
Reviewed by: kargl, fuz
Approved by: fuz (mentor)
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D60642
libm: Implement iseqsig()
C23 adds iseqsig(), the signaling counterpart of ==, which
raises FE_INVALID on any NaN rather than only on signaling
ones (as per §7.12.17.7). The helpers raise it explicitly
instead of relying on relational operators, which the
compiler may emit as quiet comparisons, and the macro
dispatches on float_t so that wider-evaluated arguments
are not narrowed (§F.10.14.1).
Reviewed by: kargl, fuz
Approved by: fuz (mentor)
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D60642
[LV] Pre-commit tests for FP derived IV index conversion (NFC) (#240741)
Add a test for an FP induction with a trip count above INT32_MAX, which
is currently miscompiled because the iteration index is converted with
sitofp. Also add an X86 cost test for converting an i64 index of an FP
derived IV.
The fix is in #240743.
Assisted-by: Claude Code
stop checking for if_type == IFT_IEEE8023ADLAG everywhere.
trunk no longer overwrites the if_type on ports, so it's not going
to be IFT_IEEE8023ADLAG.
in particular this fixes packet reception on trunk interfaces.
found by and fixed tested by landry@
[CIR] Use memory types for bool aggregate constants (#236082)
CIR lowers scalar bool values to `i1`, but bool objects use byte-sized
storage. For example, a `bool[3]` becomes `!llvm.array<3 x i8>`, so its
dense initializer must use `tensor<3xi8>` rather than `tensor<3xi1>`.
Thread the converted element type and module-scoped data layout through
aggregate constant lowering so bool arrays and record members use the
memory type selected by `convertTypeForMemory`. This keeps constant
attributes consistent with their LLVM container types and retains bool's
`i1` value representation.
---------
Co-authored-by: Steffen Larsen <sholstla at amd.com>