Skip to content

Commit ce2bd60

Browse files
committed
[libclc] Mark INLINE sincos helper functions in clc_sincos_piby4.inc as static
When INLINE functions fail to be inlined, they are deleted by EliminateAvailableExternallyPass because they have available_externally attribute. Therefore, they become unresolved in libspirv-native_cpu.bc. Mark as static to fix the attribute. An alternative fix is to move function definitions into clc/lib/generic/math/clc_sincos_helpers.cl.
1 parent bc54528 commit ce2bd60

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

libclc/clc/include/clc/math/clc_sincos_piby4.inc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#if __CLC_FPSIZE == 32
1010

1111
// Evaluate single precisions in and cos of value in interval [-pi/4, pi/4]
12+
static // INTEL
1213
_CLC_INLINE _CLC_OVERLOAD void
1314
__clc_sincos_piby4(__CLC_GENTYPE x, private __CLC_GENTYPE *sinval,
1415
private __CLC_GENTYPE *cosval) {
@@ -47,6 +48,7 @@ __clc_sincos_piby4(__CLC_GENTYPE x, private __CLC_GENTYPE *sinval,
4748

4849
#elif __CLC_FPSIZE == 64
4950

51+
static // INTEL
5052
_CLC_INLINE _CLC_OVERLOAD void
5153
__clc_sincos_piby4(__CLC_GENTYPE x, __CLC_GENTYPE xx,
5254
private __CLC_GENTYPE *sinval,
@@ -108,6 +110,7 @@ __clc_sincos_piby4(__CLC_GENTYPE x, __CLC_GENTYPE xx,
108110
*cosval = cp;
109111
}
110112

113+
static // INTEL
111114
_CLC_INLINE _CLC_OVERLOAD void __clc_tan_piby4(__CLC_GENTYPE x,
112115
__CLC_GENTYPE xx,
113116
private __CLC_GENTYPE *leadval,

0 commit comments

Comments
 (0)