amd/common: move llvm helper prototype to ac_llvm_util.h

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
Nicolai Hähnle 2016-10-27 16:48:42 +02:00
parent 37d646c1b3
commit 8eabee9ec0
4 changed files with 13 additions and 7 deletions

View file

@ -31,13 +31,12 @@
# undef DEBUG
#endif
#include "ac_nir_to_llvm.h"
#include "ac_llvm_util.h"
#include <llvm-c/Core.h>
#include <llvm/Target/TargetOptions.h>
#include <llvm/ExecutionEngine/ExecutionEngine.h>
extern "C" void
ac_add_attr_dereferenceable(LLVMValueRef val, uint64_t bytes)
void ac_add_attr_dereferenceable(LLVMValueRef val, uint64_t bytes)
{
llvm::Argument *A = llvm::unwrap<llvm::Argument>(val);
llvm::AttrBuilder B;

View file

@ -28,4 +28,14 @@
#include "amd_family.h"
#ifdef __cplusplus
extern "C" {
#endif
LLVMTargetMachineRef ac_create_target_machine(enum radeon_family family);
void ac_add_attr_dereferenceable(LLVMValueRef val, uint64_t bytes);
#ifdef __cplusplus
}
#endif

View file

@ -22,6 +22,7 @@
*/
#include "ac_nir_to_llvm.h"
#include "ac_llvm_util.h"
#include "ac_binary.h"
#include "sid.h"
#include "nir/nir.h"

View file

@ -113,7 +113,3 @@ void ac_compile_nir_shader(LLVMTargetMachineRef tm,
#define AC_USERDATA_CS_GRID_SIZE 10
#ifdef __cplusplus
extern "C"
#endif
void ac_add_attr_dereferenceable(LLVMValueRef val, uint64_t bytes);