Skip to content

Commit dd89af7

Browse files
authored
[libclc] Move 'half' builtins to CLC library (llvm#139563)
There are no changes to the generated bytecode.
1 parent 4f0be94 commit dd89af7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+648
-111
lines changed

libclc/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ include( GNUInstallDirs )
2020
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS
2121
amdgcn-amdhsa/lib/SOURCES;
2222
amdgcn/lib/SOURCES;
23-
amdgpu/lib/SOURCES;
2423
clspv/lib/SOURCES;
2524
generic/lib/SOURCES;
2625
ptx-nvidiacl/lib/SOURCES;

libclc/amdgpu/lib/SOURCES

Lines changed: 0 additions & 9 deletions
This file was deleted.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
9+
#ifndef __CLC_MATH_CLC_HALF_COS_H__
10+
#define __CLC_MATH_CLC_HALF_COS_H__
11+
12+
#define __FLOAT_ONLY
13+
#define __CLC_FUNCTION __clc_half_cos
14+
#define __CLC_BODY <clc/shared/unary_decl.inc>
15+
16+
#include <clc/math/gentype.inc>
17+
18+
#undef __CLC_FUNCTION
19+
#undef __FLOAT_ONLY
20+
21+
#endif // __CLC_MATH_CLC_HALF_COS_H__
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
9+
#ifndef __CLC_MATH_CLC_HALF_DIVIDE_H__
10+
#define __CLC_MATH_CLC_HALF_DIVIDE_H__
11+
12+
#define __FLOAT_ONLY
13+
#define __CLC_FUNCTION __clc_half_divide
14+
#define __CLC_BODY <clc/shared/binary_decl.inc>
15+
16+
#include <clc/math/gentype.inc>
17+
18+
#undef __CLC_FUNCTION
19+
#undef __FLOAT_ONLY
20+
21+
#endif // __CLC_MATH_CLC_HALF_DIVIDE_H__
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
9+
#ifndef __CLC_MATH_CLC_HALF_EXP_H__
10+
#define __CLC_MATH_CLC_HALF_EXP_H__
11+
12+
#define __FLOAT_ONLY
13+
#define __CLC_FUNCTION __clc_half_exp
14+
#define __CLC_BODY <clc/shared/unary_decl.inc>
15+
16+
#include <clc/math/gentype.inc>
17+
18+
#undef __CLC_FUNCTION
19+
#undef __FLOAT_ONLY
20+
21+
#endif // __CLC_MATH_CLC_HALF_EXP_H__
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
9+
#ifndef __CLC_MATH_CLC_HALF_EXP10_H__
10+
#define __CLC_MATH_CLC_HALF_EXP10_H__
11+
12+
#define __FLOAT_ONLY
13+
#define __CLC_FUNCTION __clc_half_exp10
14+
#define __CLC_BODY <clc/shared/unary_decl.inc>
15+
16+
#include <clc/math/gentype.inc>
17+
18+
#undef __CLC_FUNCTION
19+
#undef __FLOAT_ONLY
20+
21+
#endif // __CLC_MATH_CLC_HALF_EXP10_H__
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
9+
#ifndef __CLC_MATH_CLC_HALF_EXP2_H__
10+
#define __CLC_MATH_CLC_HALF_EXP2_H__
11+
12+
#define __FLOAT_ONLY
13+
#define __CLC_FUNCTION __clc_half_exp2
14+
#define __CLC_BODY <clc/shared/unary_decl.inc>
15+
16+
#include <clc/math/gentype.inc>
17+
18+
#undef __CLC_FUNCTION
19+
#undef __FLOAT_ONLY
20+
21+
#endif // __CLC_MATH_CLC_HALF_EXP2_H__
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
9+
#ifndef __CLC_MATH_CLC_HALF_LOG_H__
10+
#define __CLC_MATH_CLC_HALF_LOG_H__
11+
12+
#define __FLOAT_ONLY
13+
#define __CLC_FUNCTION __clc_half_log
14+
#define __CLC_BODY <clc/shared/unary_decl.inc>
15+
16+
#include <clc/math/gentype.inc>
17+
18+
#undef __CLC_FUNCTION
19+
#undef __FLOAT_ONLY
20+
21+
#endif // __CLC_MATH_CLC_HALF_LOG_H__
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
9+
#ifndef __CLC_MATH_CLC_HALF_LOG10_H__
10+
#define __CLC_MATH_CLC_HALF_LOG10_H__
11+
12+
#define __FLOAT_ONLY
13+
#define __CLC_FUNCTION __clc_half_log10
14+
#define __CLC_BODY <clc/shared/unary_decl.inc>
15+
16+
#include <clc/math/gentype.inc>
17+
18+
#undef __CLC_FUNCTION
19+
#undef __FLOAT_ONLY
20+
21+
#endif // __CLC_MATH_CLC_HALF_LOG10_H__
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
9+
#ifndef __CLC_MATH_CLC_HALF_LOG2_H__
10+
#define __CLC_MATH_CLC_HALF_LOG2_H__
11+
12+
#define __FLOAT_ONLY
13+
#define __CLC_FUNCTION __clc_half_log2
14+
#define __CLC_BODY <clc/shared/unary_decl.inc>
15+
16+
#include <clc/math/gentype.inc>
17+
18+
#undef __CLC_FUNCTION
19+
#undef __FLOAT_ONLY
20+
21+
#endif // __CLC_MATH_CLC_HALF_LOG2_H__

0 commit comments

Comments
 (0)