[all-commits] [llvm/llvm-project] 9e0b2b: [libclc] Don't rely on fp16 pragma guards in heade...
Fraser Cormack via All-commits
all-commits at lists.llvm.org
Wed Jan 22 01:32:42 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9e0b2b68c2246332fc6035ee70d48a651c2dd6ca
https://github.com/llvm/llvm-project/commit/9e0b2b68c2246332fc6035ee70d48a651c2dd6ca
Author: Fraser Cormack <fraser at codeplay.com>
Date: 2025-01-22 (Wed, 22 Jan 2025)
Changed paths:
M libclc/clc/include/clc/clcmacro.h
M libclc/generic/lib/math/acos.cl
M libclc/generic/lib/math/acosh.cl
M libclc/generic/lib/math/acospi.cl
M libclc/generic/lib/math/asinh.cl
M libclc/generic/lib/math/atan.cl
M libclc/generic/lib/math/atan2.cl
M libclc/generic/lib/math/atan2pi.cl
M libclc/generic/lib/math/atanh.cl
M libclc/generic/lib/math/atanpi.cl
M libclc/generic/lib/math/cbrt.cl
M libclc/generic/lib/math/cos.cl
M libclc/generic/lib/math/cosh.cl
M libclc/generic/lib/math/cospi.cl
M libclc/generic/lib/math/exp.cl
M libclc/generic/lib/math/expm1.cl
M libclc/generic/lib/math/lgamma.cl
M libclc/generic/lib/math/log1p.cl
M libclc/generic/lib/math/logb.cl
M libclc/generic/lib/math/sin.cl
M libclc/generic/lib/math/sinh.cl
M libclc/generic/lib/math/sinpi.cl
M libclc/generic/lib/math/tanh.cl
Log Message:
-----------
[libclc] Don't rely on fp16 pragma guards in headers (#122751)
Having the fp16 pragmas enabled in the header file is risky. The macros
defined by that header don't (and can't) include the pragmas that make
fp16 types themselves legal, and another header may disable the fp16
pragma before the macro's use.
The safest thing to do is the use of pragmas surrounding each use of the
macro in the implementation files. This pattern is also far more common
across the codebase.
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