[libclc] Move prefetch to clc library (#141721)

llvm-diff shows no change to amdgcn--amdhsa.bc
This commit is contained in:
Wenju He
2025-05-29 01:11:06 +00:00
committed by GitHub
parent 6ee2453360
commit 6e3d668206
7 changed files with 59 additions and 1 deletions

View File

@@ -0,0 +1,18 @@
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef __CLC_ASYNC_CLC_PREFETCH_H__
#define __CLC_ASYNC_CLC_PREFETCH_H__
#define __CLC_BODY <clc/async/clc_prefetch.inc>
#include <clc/integer/gentype.inc>
#define __CLC_BODY <clc/async/clc_prefetch.inc>
#include <clc/math/gentype.inc>
#endif // __CLC_ASYNC_CLC_PREFETCH_H__

View File

@@ -0,0 +1,10 @@
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
_CLC_OVERLOAD _CLC_DECL void __clc_prefetch(const global __CLC_GENTYPE *p,
size_t num_gentypes);

View File

@@ -1,3 +1,4 @@
async/clc_prefetch.cl
common/clc_degrees.cl common/clc_degrees.cl
common/clc_radians.cl common/clc_radians.cl
common/clc_sign.cl common/clc_sign.cl

View File

@@ -0,0 +1,16 @@
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#include <clc/async/clc_prefetch.h>
#include <clc/internal/clc.h>
#define __CLC_BODY <clc_prefetch.inc>
#include <clc/integer/gentype.inc>
#define __CLC_BODY <clc_prefetch.inc>
#include <clc/math/gentype.inc>

View File

@@ -0,0 +1,10 @@
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
_CLC_OVERLOAD _CLC_DEF void __clc_prefetch(const global __CLC_GENTYPE *p,
size_t num_gentypes) {}

View File

@@ -6,6 +6,7 @@
// //
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
#include <clc/async/clc_prefetch.h>
#include <clc/opencl/clc.h> #include <clc/opencl/clc.h>
#define __CLC_BODY <prefetch.inc> #define __CLC_BODY <prefetch.inc>

View File

@@ -7,4 +7,6 @@
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
_CLC_OVERLOAD _CLC_DEF void prefetch(const global __CLC_GENTYPE *p, _CLC_OVERLOAD _CLC_DEF void prefetch(const global __CLC_GENTYPE *p,
size_t num_gentypes) {} size_t num_gentypes) {
__clc_prefetch(p, num_gentypes);
}