Implement prefetch builtin

The default implementation is a no-op.  Targets should override this
with their own implementations.

llvm-svn: 216127
This commit is contained in:
Tom Stellard 2014-08-20 21:23:03 +00:00
parent 425c181fb4
commit 2ad4243bf7
6 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,3 @@
#define __CLC_BODY <clc/async/prefetch.inc>
#include <clc/async/gentype.inc>
#undef __CLC_BODY

View File

@ -0,0 +1 @@
_CLC_OVERLOAD _CLC_DECL void prefetch(const global __CLC_GENTYPE *p, size_t num_gentypes);

View File

@ -126,6 +126,9 @@
#include <clc/synchronization/cl_mem_fence_flags.h>
#include <clc/synchronization/barrier.h>
/* 6.11.10 Async Copy and Prefetch Functions */
#include <clc/async/prefetch.h>
/* 6.11.11 Atomic Functions */
#include <clc/atomic/atomic_add.h>
#include <clc/atomic/atomic_dec.h>

View File

@ -1,3 +1,4 @@
async/prefetch.cl
atomic/atomic_impl.ll
cl_khr_global_int32_base_atomics/atom_add.cl
cl_khr_global_int32_base_atomics/atom_dec.cl

View File

@ -0,0 +1,9 @@
#include <clc/clc.h>
#ifdef cl_khr_fp64
#pragma OPENCL EXTENSION cl_khr_fp64 : enable
#endif
#define __CLC_BODY <prefetch.inc>
#include <clc/async/gentype.inc>
#undef __CLC_BODY

View File

@ -0,0 +1 @@
_CLC_OVERLOAD _CLC_DEF void prefetch(const global __CLC_GENTYPE *p, size_t num_gentypes) { }