Instead add a proper attribute in clang, and add convert it to function metadata to keep the information in the IR. The goal is to remove the dependency on __attribute__((assume)) that should have not be there in the first place. Ref https://github.com/llvm/llvm-project/pull/84934
14 lines
471 B
C
14 lines
471 B
C
#define _CLC_OVERLOAD __attribute__((overloadable))
|
|
#define _CLC_DECL
|
|
#define _CLC_INLINE __attribute__((always_inline)) inline
|
|
|
|
// avoid inlines for SPIR-V related targets since we'll optimise later in the
|
|
// chain
|
|
#if defined(CLC_SPIRV) || defined(CLC_SPIRV64)
|
|
#define _CLC_DEF
|
|
#elif defined(CLC_CLSPV) || defined(CLC_CLSPV64)
|
|
#define _CLC_DEF __attribute__((noinline)) __attribute__((clspv_libclc_builtin))
|
|
#else
|
|
#define _CLC_DEF __attribute__((always_inline))
|
|
#endif
|