clang: Add convergence control bundles when creating calls (#230765)
Instead of creating a call and then recreating it with a convergencectrl
operand bundle, add the bundle when the call is created. Recreating the
call left EmitCall's callOrInvoke pointing at the erased call, and lost
any metadata already attached to it, such as !alloc_token and
!callee_type.
For calls from EmitCall, decide whether a token is needed from the call
site attributes derived from the callee declaration, rather than from
the IR.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
Revert "Reapply "clang: Use TargetID parsing from AMDGPUTargetParser" (#213824)" (#232455)
Reverts llvm/llvm-project#231420
issues seen downstream building hipBLASlt
@sumesh13 working on reproducer
[RISCV] Create zero vector rather than bitcasting from i32 0 in lowerINSERT_SUBVECTOR.
Teach LowerBUILD_VECTOR to create SPLAT_VECTOR when all operands
are the same to prevent regression.
[SampleProf] Don't re-read profiles that are already loaded in incremental reads with a remapper (#230386)
As demonstrated by test case in https://github.com/llvm/llvm-project/pull/231339 and
https://github.com/llvm/llvm-project/pull/232461, with `-sample-profile-remapping-file` and `-salvage-stale-profile
-salvage-unused-profile`, reader sees double function counters and duplicated vtable warnings (treated as an error in certain build
configs).
This patch fixes the duplicated read when the sample prof reader is reading a non context-sensitive, non MD5 profile and configured with `-sample-profile-remapping-file`. Will work on the other scenarios (starting at
https://github.com/llvm/llvm-project/blob/e80745b3a83cf4ad104788df9d0b1e48312b3f63/llvm/lib/ProfileData/SampleProfReader.cpp#L1224)
in follow up changes.
The fix is to skip top-level profiles that are already present in profiles before decoding them. A profile record maps to one byte range in an immutable buffer and its decoding depends only on reader-wide settings fixed at header time, so a second read could only add the same counts again.
[Clang] Fix mangling of parenthesized aggregate initialization (#232357)
Clang was not correctly including the arguments used to initialize a
struct with parentheses in the generated symbol name. This could give
different template expressions the same symbol name, and some cast forms
could crash while being mangled.
Used the arguments written in the source when generating the symbol
name, including for C-style casts and static_cast.
Followed the Itanium ABI section 5.1.6 for mangling.
The generated names were compared with GCC 15.2 and GCC trunk:
https://godbolt.org/z/xWPcnr3K6
Fixes #231953
dsl_crypt: say when change-key finds a key it cannot unwrap
When change-key reaches a dataset whose DSL Crypto Key cannot be
unwrapped with its encryption root's wrapping key, the check returns
EACCES and libzfs reports "Key is not currently loaded." libzfs has
already confirmed through keystatus that the root's wrapping key is
loaded before it issues the ioctl, so the message points at the wrong
problem.
spa_keystore_change_key_check_impl() now holds the root's wrapping
key while it takes the hold on each DSL Crypto Key. The wrapping key
cannot be unloaded in between, so an EACCES from the key hold is an
unwrap failure. Return ZFS_ERR_CRYPTO_KEY_MISMATCH for it and name the
dataset with dprintf_dd(). libzfs reports that a dataset sharing the
target's encryption root has a key that cannot be unwrapped. A
wrapping key that is not loaded still gives EACCES and the old
message.
zfs_change-key_mismatch now checks for the new message.
[4 lines not shown]
asciinema: Import asciinema-3.2.1 as misc/asciinema
asciinema (aka asciinema CLI or asciinema recorder) is a command-line
tool for recording and live streaming terminal sessions.
Unlike typical screen recording software, which records visual output
of a screen into a heavyweight video files (`.mp4`, `.mov`), asciinema
CLI runs inside a terminal, capturing terminal session output into a
lightweight recording files in the asciicast format (`.cast`), or
streaming it live to viewers in real-time.
The recordings can be replayed in a terminal, embedded on a web page
with the asciinema player, or published to an asciinema server, such as
asciinema.org, for further sharing. Live streams allow viewers to watch
terminal sessions as they happen.
This is a rewrite of misc/py-asciinema in Rust and it is the currently
maintained version.
[mlir][Mem2Reg] Standardise memory slot interface implementation file names (nfc) (#232637)
Renames the files implementing the interfaces defined in
`MemorySlotInterfaces.td` to consistently use
`MemorySlotInterfacesImpl.{h,cpp}`.
The previous names (e.g. `MemRefMemorySlot.h` and
`MemorySlotOpInterfaceImpl.h`) were inconsistent with the TableGen
definition, particularly its use of the plural `Interfaces`.
Also:
* Adds and updates comments to clarify that the implementations in
`mlir/lib/Dialect/MemRef/Transforms/` use external models, unlike
those in `mlir/lib/Dialect/MemRef/IR/`.
* Moves all Mem2Reg tests to `mlir/test/Transforms/Mem2Reg/`. As
demonstrated by #217793, these tests depend on multiple dialects,
making `mlir/test/Transforms/` a more appropriate location than
`mlir/test/Dialect/`.
libspl: split usleep_range() into seconds and nanoseconds
The userspace usleep_range() put the entire minimum into tv_nsec.
For a minimum of one second or more that is not a valid timespec, so
nanosleep() failed with EINVAL and returned immediately, and the
caller did not sleep at all.
zfs_sleep_until() calls it, so every userspace sleep of a second or
more was skipped: the dmu_tx_delay(), vdev_indirect and zio_inject
delays.
Kernel builds are not affected, as Linux uses the kernel's own
usleep_range() and FreeBSD has its own macro.
Take the minimum modulo MICROSEC for tv_nsec. While here, evaluate
the argument once and parenthesise it, so an expression with side
effects or a lower precedence than the operators no longer misbehaves.
Reviewed-by: Alexander Motin <alexander.motin at TrueNAS.com>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
[2 lines not shown]
unit/timer: test usleep_range() in libspl
Add a unit test for the userspace usleep_range() macro. It checks
that a sub-second sleep and a sleep of more than one second both last
at least as long as requested, and that the minimum argument is
evaluated only once.
The macro currently fails the last two. It passes the whole minimum
as tv_nsec, which nanosleep() rejects with EINVAL once the minimum
reaches one second, so the call returns without sleeping. It also
evaluates the minimum twice. The fix follows.
Reviewed-by: Alexander Motin <alexander.motin at TrueNAS.com>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Tigerblue77 <37409593+tigerblue77 at users.noreply.github.com>
Closes #19414
[AMDGPU][NFC] Explicitly narrow conversions in hazard and waitcnt passes (#215197)
Fixes 53 instances of MSVC warning C4244 and 11 of C4267 ("possible loss of data") across 6 files in llvm/lib/Target/AMDGPU.
Assisted-by: Claude <noreply at anthropic.com>
[RISCV] Ignore debug uses when folding offsets into a global address (#231718)
Check for non-debug uses instead. The fold changes the value of the
address register, so make its debug users undef first, and make those of
the erased offset instructions undef too.
Assisted-by: Claude