[MLIR][Transform] Allow any kind of transform param in mixed args (#183163)
Changes check to be on the interface so that `!transform.any_param`
typed values are accepted in addition to `!transform.param<...>`.
[OMPIRBuilder] Replace getAllocatedType with getAllocationSize (#181844)
Replace size queries using getTypeStoreSize(getAllocatedType()) with
getAllocationSize(DL) in createTaskloop, createTask, emitTargetTask, and
emitTargetTaskProxyFunction. For GEP type arguments in
emitNonContiguousDescriptor and emitOffloadingArrays, use the local
ArrayTy/PointerArrayType variables already in scope instead of
re-querying the alloca.
The store size of a struct is the same as the allocation size, so this
part should be NFC, and removes unnecessary uses of getAllocatedType, in
pursuit of the eventual deprecation of the getAllocatedType interface.
Co-authored-by: Claude Sonnet 4.5 <noreply at anthropic.com>
[clang-tidy] Simplify and generalize `performance-string-view-conversions` (#182783)
This change teaches the check to detect the redundant `string_view ->
string -> string_view` conversion chain in places besides function calls
(notably, in constructor calls), all with less code.
No release note, because this check hasn't been released yet.
tools/build/stddef.h: fix stock clang/gcc headers
Both clang and gcc's stddef.h are designed to be included multiple times
with different combinations of __need_* macros defined (e.g
__need_size_t). Remove the #pragma once to accommodate this, ptraddr_t
is guarded by _PTRADDR_T_DECLARED anyways.
Also use __SIZE_TYPE__ instead of size_t since it's not guaranteed to be
defined.
Reviewed by: brooks, imp, kib
Differential Revision: https://reviews.freebsd.org/D55453
bsdinstall: fix EFI boot entry creation
update_uefi_bootentry assumes that the caller sets FREEBSD_BOOTNAME and
mntpt, which isn't the case anymore. The result is that there is no
"FreeBSD" boot entry created/updated after install. Most machines manage
to boot from the removable media path (if the loader is installed there
too), but some don't.
Take the loader's path as an argument and rename the variable used in
the ZFS mirror loop so mntpt can be reused below.
Also mark nentries as a local variable so it doesn't leak out of the
function.
PR: 293385
Fixes: 494de51bc0074472d1b01604f085daea0844f240
MFC after: 2 days
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D55469
[libc] Remove MSAN_UNPOISON from `bit_cast` and `bit_copy` (#183124)
The `MSAN_UNPOISON` calls were manually unpoisoning the source memory,
which can hide legitimate bugs where uninitialized memory is being
copied.
`MSAN_UNPOISON` should not be used in such wide spread utilities as
`bit_cast` and `bit_copy` but rather close to API boundary where
have no better way to avoid uninitialized bits.
* `MSAN_UNPOISON` was add to `bit_copy` with #165015, but it looks like
a copy-paste from `bit_cast`.
* `bit_cast` has it from #70067, but I can't find valid reproducer any
more. If it's still the issue, `MSAN_UNPOISON` \
should move close the source of uninitialized values.
[MachinePipeliner] Fix crash during prolog peeling (#182189)
Fix crash during prolog peeling when loop preheader terminates with a
fallthrough conditional branch
The crash was happening due to the wrong preheader layout successor
being passed to `updateTerminator`; in general, the loop kernel will not
be the layout successor after prolog peeling. Fix this by passing the
right layout successor.
acpi: Use __BUS_ACCESSOR_DEFAULT and __BUS_ACCESSOR for IVARs
- Use __BUS_ACCESSOR_DEFAULT for the global handle IVAR to preserve
existing behavior for acpi_get_handle.
- Use __BUS_ACCESSOR for the private ACPI IVARs as these are only used
with direct children of acpi0.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D55355
acpi: Split ACPI IVARs into global and private sets
ACPI_IVAR_HANDLE is the only true "global" IVAR that can be used
across multiple bus drivers. The other IVARs are private to direct
children of acpi0. However, they need to be numbered after ISA IVARs
as ACPI mimics an ISA bus device. To ensure this remains true, add an
ISA_IVAR_LAST to use in assert that the private ACPI IVARs do not
overlap with ISA IVARs.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D55354
bus: Add __BUS_ACCESSOR_DEFAULT
This macro is similar to __BUS_ACCESSOR in that it creates three
helper routines for an ivar, but the "get" wrapper returns a default
value if BUS_READ_IVAR does not return a value.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D55353
bus: Add a new IVAR accessor to check for the existence of an IVAR
<varp>_has_<var> returns true if the given IVAR can be read.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D55352
sdiob: Forward-declare struct sdio_func
Currently this happens as a side effect of the return type of
sdio_get_function() in the expansion of __BUS_ACCESSOR, but this is
fragile and can break if __BUS_ACCESSOR changes to define other
functions first.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D55351
ccp: Don't name anonymous structure and union types
Keep the dword labels as comments instead. Anonymous structs and
unions don't have type names in C11+.
Differential Revision: https://reviews.freebsd.org/D55144
__builtin_align_down: Cast value to __uintptr_t in the fallback
This matches the behavior of the fallbacks for __builtin_align_up
and __builtin_is_aligned.
Reviewed by: arichardson, ngie, kib
Differential Revision: https://reviews.freebsd.org/D55161
ValueTracking: Teach computeKnownFPClass that multiply by <=1 cannot overflow
If one operand is known not-inf, that can be propagated if the other operand is
known to have a magnitude <= 1.
This enables elimination of some inf checks inside the implementation of trig
functions when the input is known not-inf.
17888 pargs botches composite locale naming
Reviewed by: Andy Fiddaman <illumos at fiddaman.net>
Reviewed by: Toomas Soome <tsoome at me.com>
Approved by: Robert Mustacchi <rm at fingolfin.org>