[libclc] Move prefetch to clc library (#141721)
llvm-diff shows no change to amdgcn--amdhsa.bc
This commit is contained in:
18
libclc/clc/include/clc/async/clc_prefetch.h
Normal file
18
libclc/clc/include/clc/async/clc_prefetch.h
Normal 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__
|
||||||
10
libclc/clc/include/clc/async/clc_prefetch.inc
Normal file
10
libclc/clc/include/clc/async/clc_prefetch.inc
Normal 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);
|
||||||
@@ -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
|
||||||
|
|||||||
16
libclc/clc/lib/generic/async/clc_prefetch.cl
Normal file
16
libclc/clc/lib/generic/async/clc_prefetch.cl
Normal 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>
|
||||||
10
libclc/clc/lib/generic/async/clc_prefetch.inc
Normal file
10
libclc/clc/lib/generic/async/clc_prefetch.inc
Normal 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) {}
|
||||||
@@ -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>
|
||||||
|
|||||||
@@ -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);
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user