[SCEV] Add recursion depth limit to isKnownPredicate (NFC). (#246438)
Add a depth limit to isKnownPredicate, to restrict the depth of
recursive reasoning. The new isKnownPredicateImpl takes the current
recurion depth and gives up once the limit is reached.
Currently this only passes the depth through to
isKnownPredicateViaSplitting. isKnownViaInduction is not as
straight-forward, as it only indirectly calls isKnownPredicate via
isLoopEntryGuardedByCond/isLoopBackedgeGuardedByCond.
Split off from https://github.com/llvm/llvm-project/pull/208546.
PR: https://github.com/llvm/llvm-project/pull/246438
[X86] Prefer 256-bit vectors for novalake (#238053)
As in title. This was missed during initial implementation. Novalake
should be inline with other arches wrt. to TuningPrefer256Bit
[offload][acc] Add the OpenACC DeviceManager
The DeviceManager maps the OpenACC device types and device numbers to the
devices of the plugin manager, and keeps the device selection ICVs of each
thread. Implement acc_get_num_devices, acc_get_device_type,
acc_set_device_type, acc_get_device_num and acc_set_device_num on top of it.
Add Fortran tests of these routines and of the ICVs being per thread. They use
the libacctarget_test module to bring the runtime up and down, until the
compiler driver does it.
Assisted-by: Claude Sonnet 5.5
[Offload][NFC] Drop redundant using-directive for offloading::sycl (#246526)
Utility.cpp already qualifies its only sycl definition as
sycl::writeSymbolTable, so the file-scope using-directive for
llvm::offloading::sycl is unnecessary.
Assisted-By: Claude Code
Live ISO: find the boot media by its NEXTBSD label only (#381) (#737)
/init took any /dev/cd0 as the boot medium. The mfsroot is the root
file system, so mountroot never waits for USB: on a machine with an
optical drive, cd0 attached before the USB stick, the settle loop
stopped on it, mount_cd9660 failed (no disc), and the one-pass
candidate loop gave up seconds before da0 and iso9660/NEXTBSD
appeared. init then pivoted into an empty union and the kernel
panicked: Going nowhere without my init!
Look only for /dev/iso9660/NEXTBSD, which GEOM_LABEL gives the
volume on a burned disc and on a USB stick alike. Retry each second
for up to 60 s until it mounts and holds rootfs.uzip, unmounting a
volume without one. If it never turns up, say so, list the labels
and disks, and hold a shell on the console; exiting it looks again.
No optical drive, one, or several make no difference now.
Closes #381
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
Reapply "[clang] Suppress -Wuninitialized for unevaluated builtin args" (#245821)
This reapplies f19973fdd2fe (#217816), reverted in 550bc0246c54, with a
different implementation.
f19973fdd2fe left the arguments of every builtin with the
`UnevaluatedArguments` attribute out of the CFG, as CFGBuilder already
did for `__builtin_object_size` and `__builtin_dynamic_object_size`.
A warning queued with DiagRuntimeBehavior is kept when its expression
has no CFG block, so warnings in branches of those arguments that fold
away were no longer dropped. This broke -Werror builds of the Linux
kernel, where MAYBE_BUILD_BUG_ON wraps ilog2() in
`__builtin_constant_p`:
__builtin_constant_p(n) ? ... : (sizeof(n) <= 4) ? __ilog2_u32(n) : ...
Now only the two object size builtins leave their arguments out of the
CFG, as before f19973fdd2fe. Instead, the uninitialized values analysis
ignores references in the arguments of any call for which
[22 lines not shown]
[Mips] Do not create MIPS16 FP call stubs for constrained intrinsics (#246086)
Mips16HardFloat creates FP call stubs for calls to functions with FP
arguments or return values, except for a list of intrinsics that are
lowered inline. Constrained FP intrinsics were not on that list, so a
stub was created with the intrinsic's signature, including its metadata
parameters, and the module failed verification.
Treat constrained FP intrinsics like the unconstrained operations they
correspond to.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[MC][NFC] Remove virtual shouldOmitSectionDirective (#246682)
Remove the virtual hook shouldOmitSectionDirective in favor of a small
string set of section names that can be used without a .section
directive in MCAsmInfo. Also fold UsesELFSectionDirectiveForBSS into
this set and require explicit addition of .bss, as most targets do not
support .bss without .section.
Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
Pull arm64 fixes from Catalin Marinas:
"Mostly missing barriers and break-before-make in kernel page table
updates (fixmap, early ID map, KPTI) plus a livepatch fix for late PLT
writes to read-only module text:
- Fix missing barriers and break-before-make in kernel page table
updates: ISBs after mapping the FDT in the initial ID map and after
remapping the KPTI page-table slot; non-deferred barriers for
fixmap entries in lazy MMU mode; break-before-make when overwriting
a valid fixmap entry
- Route late (livepatch) PLT and ADRP veneer writes through the
text-poke API as the module's .plt section is read-only by then"
* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
arm64: fixmap: fix missing break-before-make in __set_fixmap()
arm64: module: Use text-poke for late PLT/veneer emission
[3 lines not shown]
[KnownFPClass][NFC] Separate the negative zero deductions in sinh/tanh/asin (#246172)
Refactors `KnownFPClass::sinh/tanh/asin` so that they rule out
`fcNegZero` in a separate/dedicated clause. In general, these functions
are sign-preserving but have extra complexities when ruling out
-0.0/+0.0 (due to denormal flushing, and compensating for low quality
`libm` implementations), which is why these functions only attempt to
rule out -0.0 but not +0.0.
This also makes it more clear where `nsz` is applicable for
https://github.com/llvm/llvm-project/pull/241661
[flang] Mark all visible Cray pointer targets (#241388)
When a Cray pointer is set to a variable's address, flang gives that
variable the TARGET attribute so alias analysis knows the pointee can
modify it. It only caught `ptr = loc(x)` with nothing else on the
right-hand side, and it only marked `x`.
This patch marks anything passed to LOC or %LOC anywhere in the
procedure, its host or their internal procedures, however the result
is used. It also marks the variable behind an ASSOCIATE name,
everything that shares storage with a marked variable through
EQUIVALENCE or COMMON, and assumed-shape dummies, which were missed
before.
This fixes an EQUIVALENCE case that is already wrong at -O1 on main,
and it is needed before #230699 can remove the runtime call on
pointee references.
Assisted-by: Claude Code
[3 lines not shown]
lang/idris2: Improve port
- Pet port{clippy,fmt,lint}.
- Simplify building and installing the port.
- Remove leftover file from pkg-plist after using sed.
- Use %%VERSION%% substitution in pkg-plist to reduce large diffs.
Reported by: arrowd
Approved by: Jens Grassel <freebsd-ports at jan0sch.de> (implicit)
lang/idris2: Improve port
- Pet port{clippy,fmt,lint}.
- Simplify building and installing the port.
- Remove leftover file from pkg-plist after using sed.
- Use %%VERSION%% substitution in pkg-plist to reduce large diffs.
Reported by: arrowd
Approved by: Jens Grassel <freebsd-ports at jan0sch.de> (implicit)
[libc][string] Optimize stpncpy() with strnlen() and inline_memcpy() (#246447)
The current stpncpy implementation copies characters using a byte by
byte loop before padding trailing null bytes with inline_bzero. Replace
the copy loop with internal::strnlen and inline_memcpy to leverage
vectorized string and memory operations, matching strncpy.
In a microbenchmark copying a 512 byte string into a 1024 byte buffer,
this reduces execution time by about 83%, or 6.1x faster.
Merge tag 's390-7.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Pull s390 fixes from Alexander Gordeev:
- Fix the cert_store code keyring locking, lifetime handling, missing
error and return code checks, several reference leaks and potential
use-after-free issues caused by unbalanced keyring reference counting
- Look up the cert_store keyring only in the user session keyring. As
result a foreign keyring named "cert_store", which a task may have
inherited, is no longer destroyed during refresh
- Fix out-of-bounds reads in hash validation and in Verification
Certificate Entry (VCE) debug output, avoid copying uninitialized
DIAG 320 data to the debug area, and print the correct value of
max_vcxe_length
- Allocate the cert_store keyring with a link restriction, so that
arbitrary keys cannot be linked into it
[23 lines not shown]
[SPIRV] Enable NSDI features by default for AMD
Enable -spirv-debug-lexical-block-discriminator-scope,
-spirv-debug-scope-forward-refs and -spirv-debug-declare-untyped-variable
when the target vendor is AMD.