From: Soumya AR
This patch extends various compiler components to handle the newly added
atomic fetch min/max builtins:
1. Address Sanitizer (asan): Extended to recognize atomic min/max builtins and
detect invalid memory accesses/overflows when these operations are used.
2. gimple-ssa-warn-a
From: Soumya AR
This patch enables libstdc++ to implement C++26's atomic min/max operations
through the newly added compiler builtins.
Similar to the __atomic_fetch_addable and __atomic_fetch_subtractable concepts,
we implement the following concepts for min/max operations:
__atomic_fetch_minab
From: Soumya AR
This patch implements __atomic_fetch_{min,max} and __atomic_{min,max}_fetch
builtins in libatomic for both signed and unsigned integer types.
---
We introduce a new signed type (STYPE) for casting signed operands in fop_n.c.
Since all current libatomic operates on unsigned types
From: Soumya AR
This patch adds support for atomic min/max instructions offered by aarch64 under
LSE.
The implementation provides three execution paths:
1. When LSE is available at compile time (-march=armv8.1-a or later):
Emits LSE atomic min/max instructions (ldsmin, ldsmax, ldumin, ldumax
From: Soumya AR
This patch adds tests to verify the correctness of atomic min/max builtins at
runtime and confirms CAS assembly on an actual target (in this case, aarch64).
- atomic-minmax.c: Checks that we emit the correct libgcc calls that get
resolved at runtime to determine if the syst
From: Soumya AR
This patch adds builtin types and function declarations for integer atomic fetch
min/max operations.
---
At RTL level, we distinguish between signed and unsigned min/max operations
based on the optab: SMIN/SMAX or UMIN/UMAX (rather than just using min/max) as
signedness is not e
From: Soumya AR
This patch adds support for expanding the following atomic min/max builtins:
__atomic_fetch_min
__atomic_fetch_max
__atomic_min_fetch
__atomic_max_fetch
into compare-and-swap loops.
---
expand_binop() is extended to handle min/max operations, either via a
conditional move or a
From: Soumya AR
Add optab definitions for both legacy __sync and __atomic min/max operations.
The legacy sync optabs are not expected to be implemented by backends. They're
included to minimize branching in expand_atomic_fetch_op_no_fallback in
gcc/optabs.cc, since this function attempts to emit
From: Soumya AR
Hi,
This patch series implements support for integer atomic fetch min/max operations
in GCC, backing the C++26 std::atomic::fetch_max and
std::atomic::fetch_min operations.
CC'ed in: The following maintainers according to parts of the compiler modified
- middle-end maintainers:
From: Soumya AR
Signed-off-by: Soumya AR
gcc/testsuite/ChangeLog:
* gcc.target/aarch64/aarch64-json-tunings/aarch64-json-tunings.exp: New
test.
* gcc.target/aarch64/aarch64-json-tunings/boolean-1.c: New test.
* gcc.target/aarch64/aarch64-json-tunings/boolean-1.json: Ne
From: Soumya AR
This commit introduces a Python maintenance script that generates C++ code
for parsing and serializing AArch64 JSON tuning parameters based on the
schema defined in aarch64-json-schema.h.
The script generates two include files:
- aarch64-json-tunings-parser-generated.inc
- aa
From: Soumya AR
This patch adds functionality to dump AArch64 CPU tuning parameters to a JSON
file. The new '-fdump-tuning-model=' flag allows users to export the current
tuning model configuration to a JSON file.
This patch was bootstrapped and regtested on aarch64-linux-gnu, no regression.
Si
From: Soumya AR
This patch adds support for loading custom CPU tuning parameters from a JSON
file for AArch64 targets. The '-muser-provided-CPU=' flag accepts a user
provided JSON file and overrides the internal tuning parameters at GCC runtime.
This patch was bootstrapped and regtested on aarch
From: Soumya AR
To allow runtime updates to tuning parameters, the const keyword is removed from
the members of the tune_params structure and the members of its nested
structures.
Since this patch also touches tuning structures in the arm backend, it was
bootstrapped on aarch64-linux-gnu as well
From: Soumya AR
This patch adds a get_map () method to the JSON object class to provide access
to the underlying hash map that stores the JSON key-value pairs.
To do this, we expose the map_t typedef, the return type of get_map().
This change is needed to allow traversal of key-value pairs when
From: Soumya AR
Hi,
This is a follow-up to suggestions given on v2 of the aarch64
user-defined tunings.
https://gcc.gnu.org/pipermail/gcc-patches/2025-July/689893.html
Attaching an updated patch series here.
Regarding some questions on this thread:
I've made the changes suggested by Andrew
From: Soumya AR
This patch adds a get_map () method to the JSON object class to provide access
to the underlying hash map that stores the JSON key-value pairs.
It also reorganizes the private and public sections of the class to expose the
map_t typedef, which is the return type of get_map().
Th
From: Soumya AR
To allow runtime updates to tuning parameters, the const keyword is removed from
the members of the tune_params structure and the members of its nested
structures.
Since this patch also touches tuning structures in the arm backend, it was
bootstrapped on aarch64-linux-gnu as well
From: Soumya AR
This patch adds support for loading custom CPU tuning parameters from a JSON
file for AArch64 targets. The '-muser-provided-CPU=' flag accepts a user
provided JSON file and overrides the internal tuning parameters at GCC runtime.
This patch was bootstrapped and regtested on aarch
From: Soumya AR
This patch adds functionality to dump AArch64 CPU tuning parameters to a JSON
file. The new '-fdump-tuning-model=' flag allows users to export the current
tuning model configuration to a JSON file.
This patch was bootstrapped and regtested on aarch64-linux-gnu, no regression.
Si
From: Soumya AR
This commit introduces a Python maintenance script that generates C++ code
for parsing and serializing AArch64 JSON tuning parameters based on the
schema defined in aarch64-json-schema.h.
The script generates two include files:
- aarch64-json-tunings-parser-generated.inc
- aa
From: Soumya AR
Signed-off-by: Soumya AR
gcc/testsuite/ChangeLog:
* gcc.target/aarch64/aarch64-json-tunings/aarch64-json-tunings.exp: New
test.
* gcc.target/aarch64/aarch64-json-tunings/boolean-1.c: New test.
* gcc.target/aarch64/aarch64-json-tunings/boolean-1.json: Ne
From: Soumya AR
Hi,
This RFC is a continuation of previous patches sent here:
https://gcc.gnu.org/pipermail/gcc-patches/2025-May/682702.html
As suggested in the earlier thread, I've now added a python script to generete
the printing and parsing routines for the JSON tuning parameters from the
From: Soumya AR
To allow runtime updates to tuning parameters, the const keyword is removed
from aarch64 tune_params and all its nested structures and structure members.
Since this patch also touches tuning structures in the arm backend, it was
bootstrapped on aarch64-linux-gnu as well as arm-li
From: Soumya AR
This patch was bootstrapped and regtested on aarch64-linux-gnu, no regression.
Signed-off-by: Soumya AR
gcc/testsuite/ChangeLog:
* gcc.target/aarch64/aarch64-json-tunings/aarch64-json-tunings.exp: New
test.
* gcc.target/aarch64/aarch64-json-tunings/boolean-1.c
From: Soumya AR
This patch adds support for loading custom CPU tuning parameters from a JSON
file for AArch64 targets. The '-muser-provided-CPU=' flag accepts a user
provided JSON file and overrides the internal tuning parameters at GCC runtime.
This patch was bootstrapped and regtested on aarch
From: Soumya AR
This patch adds functionality to dump AArch64 CPU tuning parameters to a JSON
file. The new '-fdump-tuning-model=' flag allows users to export the current
tuning model configuration to a JSON file.
This patch was bootstrapped and regtested on aarch64-linux-gnu, no regression.
Si
From: Soumya AR
This patch adds a get_map () method to the JSON object class to provide access
to the underlying hash map that stores the JSON key-value pairs.
It also reorganizes the private and public sections of the class to expose the
map_t typedef, which is the return type of get_map().
Th
From: Soumya AR
Hi,
This RFC and subsequent patch series introduces support for printing and parsing
of aarch64 tuning parameters in the form of JSON.
It is important to note that this mechanism is specifically intended for power
users to experiment with tuning parameters. This proposal does no
29 matches
Mail list logo