[all-commits] [llvm/llvm-project] ae5785: [libclc] Define macros for users of gentype.inc (#...
Fraser Cormack via All-commits
all-commits at lists.llvm.org
Thu Feb 20 07:24:27 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ae5785460dfdee82b9b3fe08fb5f2da73c91cec0
https://github.com/llvm/llvm-project/commit/ae5785460dfdee82b9b3fe08fb5f2da73c91cec0
Author: Fraser Cormack <fraser at codeplay.com>
Date: 2025-02-20 (Thu, 20 Feb 2025)
Changed paths:
M libclc/clc/include/clc/integer/gentype.inc
M libclc/clc/include/clc/math/gentype.inc
M libclc/clc/include/clc/relational/clc_select_decl.inc
M libclc/clc/include/clc/relational/clc_select_impl.inc
M libclc/clc/lib/generic/integer/clc_rotate.inc
M libclc/clc/lib/generic/math/clc_frexp.inc
M libclc/clspv/lib/shared/vstore_half.inc
M libclc/generic/include/clc/math/nan.h
M libclc/generic/include/clc/math/nan.inc
M libclc/generic/include/clc/relational/select.h
M libclc/generic/lib/math/maxmag.inc
M libclc/generic/lib/math/nan.cl
M libclc/generic/lib/math/nan.inc
M libclc/generic/lib/shared/vload_half.inc
M libclc/generic/lib/shared/vstore_half.inc
Log Message:
-----------
[libclc] Define macros for users of gentype.inc (#128012)
Several users of (mostly math/) gentype.inc rely on types other than the
'gentype'. This is commonly intN as several maths builtins expose this
as a return or paramter type. We were previously explicitly defining
this type for every gentype.
Other implementations rely on integer types of the same size and element
width as the gentype, such as short/ushort for half, long/ulong for
double, etc.
Users might also rely on as_type or convert_type builtins to/from these
types.
The previous method we used to define intN was unscalable if we wanted
to expose more types and helpers.
This commit introduces a simpler system whereby several macros are
defined at the beginning of gentype.inc. These rely on concatenating
with the vector size. To facilitate this system, scalar gentypes now
define an empty vector size. It was previously undefined, which was
dangerous. An added benefit is that it matches how the integer
gentype.inc vector size has been working.
These macros will be especially helpful for the definitions of
logb/ilogb in an upcoming patch.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list