[IndVars] Synthesize profile information for urem->select folding (#231990)
In these cases we can derive the profile information from the loop trip
count assuming a couple of assumptions are met.
[MemProf] Fix remapping of matching calls when assigning function clones
When a function has several calls with identical callsite metadata, they
are recorded on one context node with the extra calls in
Node->MatchingCalls. If that function is cloned by context
disambiguation, assignFunctions must remap each version's matching calls
through the function clone's CallMap, the same way it remaps the primary
Call.
Two problems in the IR path:
* AssignCallsiteCloneToFuncClone rewrote the matching calls of the
original node (Node->MatchingCalls) instead of those of the callsite
clone being assigned. The clone node (whose MatchingCalls were copied
from the original at creation) kept the original instructions, and the
original node's list was overwritten with the clone's. UpdateCalls then
updated each function version's matching calls with the other version's
callee clone, i.e. swapped.
[16 lines not shown]
PowerPC: Stop adding kill flags when promoting instructions to 64-bit
Continue purging kill flags from virtual register cases
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
LoongArch: Stop adding kill flags in LoongArchPreRAExpandPseudo
Continue purging kill flags on virtual registers.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[GitHub] Use client-id in require-team-membership (#235060)
app-id is deprecated and presumably going away soon, and client-id is a
drop-in replacement for our needs.
[CIR] Remove 'dead' test that no longer has a purpose. (#235069)
The patch #225814 stops us from rewriting unreachable blocks, and the
purpose of the original patch that wrote this test (#229191) intended to
make sure we handled unreachable blocks correctly.
So this test no longer matters. I left the original code in 229191 as it
is reasonable defensive code.
[libc] Suppress GCC's <mm_malloc.h> in freestanding builds (#234863)
Unlike Clang, GCC's <xmmintrin.h> (included via <immintrin.h>)
unconditionally includes <mm_malloc.h> even with -ffreestanding, which
in turn includes <stdlib.h>.
In full-build mode, targets that use x86 intrinsics (such as op_x86.h)
don't declare a dependency on libc.include.stdlib (and they don't really
need it). If these targets are built before our stdlib.h header is
generated, this will end up including the system stdlib.h -- and fail
miserably because of mixing of standard libraries. This can happen
already, but the problem gets more acute if we remove (#234150)
transitive full-header dependencies from the proxy headers (as it lets
us build these targets much sooner).
Since we don't use _mm_malloc or _mm_free, I'm suppressing <mm_malloc.h>
by defining its include guard (_MM_MALLOC_H_INCLUDED) on x86/x86_64 GCC
full builds.
Assisted-by: Gemini
Merge tag 'slab-for-7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/mm/slab
Pull slab updates from Harry Yoo:
- Performance improvement of the sheaf prefill API, by allowing the
barn to hold a partial sheaf and refilling sheaves from the barn.
This improves will-it-scale mmap1 throughput by 24% on the maple_node
cache (Hao Li)
- Restore memcg accounting of ipc msg_msg allocations, lost with e.g.
CONFIG_SLAB_BUCKETS=n where the allocations fall back to the general
kmalloc caches (Kees Cook)
- Fix an old race between kmem_cache_destroy() and slab_late_init(),
where a cache destroyed late in the boot process tries to release a
kobject that was never initialized (Imre Kaloz)
- Remove slab_folio(), the last use of struct folio in slab code
(Matthew Wilcox)
[19 lines not shown]
RuntimeLibcalls: Split __atomic_* into a separate libatomic library
The __atomic_* functions are not part of libgcc or the default
compiler-rt builtins. GCC ships them in libatomic, and compiler-rt in the
optional clang_rt.atomic. Every system that uses compiler-rt also lists
libatomic, so the available functions are unchanged.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
Merge tag 'printk-for-7.4' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux
Pull printk updates from Petr Mladek:
- John Ogness became PRINTK co-maintainer
- Unregister boot consoles when any proper console is registered at the
end of the boot phase. Before they were removed only when the
so-called preferred console, usually set via the last 'console='
parameter, got registered
- Fix computation for increasing the printk ringbuffer on systems with
many CPUs and possibly long backtraces from all CPUs
- Cleaned up irq_works handling for deferred printk operations
- Use acquire/release semantic for filled_random_ptr_key
- Allow to use ':' in console options
[12 lines not shown]
WebAssembly: Stop adding kill flags on virtual registers (#234968)
Continue purging new kill flags on virtual registers.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
sys/octeon: span work queue interrupts across CPUs
It was disabled at octciu.c,v 1.20 to allow fixing logic of ncpus which
leads to issues with devices where used cnmac wasn't mapped to CPU0
Now, since the missed splx() was added at clock.c, v1.54 I revert it back.
OK: visa@
Merge tag 'sysctl-7.04-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/sysctl/sysctl
Pull sysctl updates from Joel Granados:
- Disallow partial vector updates
Stage sysctl vector writes before updating. Removes the chance of
leaving a sysctl vector partially updated due to erroneous input.
This is not an atomic write; a concurrent reader can still see a
partially updated vector.
- Remove redundant sysctl config guards
Remove locations where (CONFIG_SYSCTL && CONFIG_PROC_FS) was checked.
They are superfluous as CONFIG_SYSCTL now depends directly on
CONFIG_PROC_FS.
- Rewrite selftests using KTAP helpers
[22 lines not shown]
[OpenMP][offload] Trade threads for blocks in Generic-SPMD kernels
The threads of a Generic-SPMD block run the inner parallel loops, whose
trip counts are unknown. Halve the threads down to one warp while the
distribute loop has an iteration for every block, and default to 6
blocks per CU on AMDGPU (LIBOMPTARGET_AMDGPU_GENERIC_SPMD_TEAMS_PER_CU).
libomptarget reads the number of compute units and the platform backend
of the device through liboffload, as part of its geometry properties.
This is an upstream port of the corresponding downstream.
Claude assisted with this patch.
[OpenMP][offload] Size the grid of cross-team reductions by their size
Every block adds to the cost of combining the partial results of a
cross-team reduction. Launch one block per compute unit for reductions
that work with a reduction data size of more than 32 bytes, and enough
blocks for a per-device number of waves per compute unit (16 on AMDGPU)
for the smaller reduction data sizes, capped by the trip count. Such
kernels keep their number of threads: the low-trip-count reduction of
threads does not apply to them. libomptarget reads the number of compute
units and the platform backend of the device through liboffload, as part
of its geometry properties.
This is an upstream port of the corresponding downstream.
Claude assisted with this patch.
[OpenMP][offload] Size only reductions that fill the device by their size
A cross-team reduction whose loop is too short for one block per compute
unit now gets the grid of a kernel without a reduction. In SPMD mode,
that is the low-trip-count rule, which lowers the number of threads per
block to spread the iterations over more compute units. Keeping all
threads made such reductions, e.g. one of 1792 iterations, up to 2.5x
slower on MI210.
Claude assisted with this patch.
Merge tag 'modules-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/modules/linux
Pull module updates from Petr Pavlu:
- Ignore local labels and mapping symbols during module load
These symbols were already ignored during kallsyms address-to-symbol
lookups. Filter them out earlier during module loading to reduce
lookup overhead and prevent them from appearing in /proc/kallsyms.
- Fix potentially incorrect access of SetOnce<T> when setting Rust
module parameters.
- Fix a potential read of an uninitialized count when printing taint
information for unloaded modules.
- Allocate the kmod argument array using kmalloc_array() in preparation
for conversion to type-aware allocators.
[33 lines not shown]
RuntimeLibcalls: Specify system libraries by name (#233569)
Each system is now described by a list of default library names.
Per-target exclusions become standalone LibraryExclusion defs.
Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
Merge tag 'kcsan-20261020-v7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/melver/linux
Pull KCSAN updates from Marco Elver:
- Avoid division by zero in kcsan_prandom_u32_max()
- test: Do not count report printing time against test duration
* tag 'kcsan-20261020-v7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/melver/linux:
kcsan: test: Do not count report printing time against test duration
kcsan: Avoid division by zero in kcsan_prandom_u32_max()