[Mesa-dev] [PATCH 10/11] ac: make some fns static
Dave Airlie
airlied at gmail.com
Wed Jun 27 03:58:44 UTC 2018
From: Dave Airlie <airlied at redhat.com>
Some of the compiler functions are no longer called outside
the util file.
---
src/amd/common/ac_llvm_util.c | 12 ++++++------
src/amd/common/ac_llvm_util.h | 7 -------
2 files changed, 6 insertions(+), 13 deletions(-)
diff --git a/src/amd/common/ac_llvm_util.c b/src/amd/common/ac_llvm_util.c
index 85dc9d72a5c..7f8c5746b37 100644
--- a/src/amd/common/ac_llvm_util.c
+++ b/src/amd/common/ac_llvm_util.c
@@ -66,7 +66,7 @@ void ac_init_llvm_once(void) {
call_once(&ac_init_llvm_target_once_flag, ac_init_llvm_target);
}
-LLVMTargetRef ac_get_llvm_target(const char *triple)
+static LLVMTargetRef ac_get_llvm_target(const char *triple)
{
LLVMTargetRef target = NULL;
char *err_message = NULL;
@@ -132,9 +132,9 @@ const char *ac_get_llvm_processor_name(enum radeon_family family)
}
}
-LLVMTargetMachineRef ac_create_target_machine(enum radeon_family family,
- enum ac_target_machine_options tm_options,
- const char **out_triple)
+static LLVMTargetMachineRef ac_create_target_machine(enum radeon_family family,
+ enum ac_target_machine_options tm_options,
+ const char **out_triple)
{
assert(family >= CHIP_TAHITI);
char features[256];
@@ -162,8 +162,8 @@ LLVMTargetMachineRef ac_create_target_machine(enum radeon_family family,
return tm;
}
-LLVMPassManagerRef ac_init_passmgr(LLVMTargetLibraryInfoRef target_library_info,
- bool check_ir)
+static LLVMPassManagerRef ac_init_passmgr(LLVMTargetLibraryInfoRef target_library_info,
+ bool check_ir)
{
LLVMPassManagerRef passmgr = LLVMCreatePassManager();
if (!passmgr)
diff --git a/src/amd/common/ac_llvm_util.h b/src/amd/common/ac_llvm_util.h
index 647cf020e43..1ba972dab87 100644
--- a/src/amd/common/ac_llvm_util.h
+++ b/src/amd/common/ac_llvm_util.h
@@ -77,11 +77,6 @@ struct ac_llvm_compiler_info {
};
const char *ac_get_llvm_processor_name(enum radeon_family family);
-LLVMTargetMachineRef ac_create_target_machine(enum radeon_family family,
- enum ac_target_machine_options tm_options,
- const char **out_triple);
-
-LLVMTargetRef ac_get_llvm_target(const char *triple);
void ac_add_attr_dereferenceable(LLVMValueRef val, uint64_t bytes);
bool ac_is_sgpr_param(LLVMValueRef param);
void ac_add_function_attr(LLVMContextRef ctx, LLVMValueRef function,
@@ -124,8 +119,6 @@ bool ac_llvm_compiler_init(struct ac_llvm_compiler_info *info,
enum radeon_family family,
enum ac_target_machine_options tm_options);
void ac_llvm_compiler_dispose(struct ac_llvm_compiler_info *info);
-LLVMPassManagerRef ac_init_passmgr(LLVMTargetLibraryInfoRef target_library_info,
- bool check_ir);
LLVMTargetLibraryInfoRef ac_create_target_library_info(const char *triple);
void ac_dispose_target_library_info(LLVMTargetLibraryInfoRef library_info);
void ac_init_llvm_once(void);
--
2.17.1
More information about the mesa-dev
mailing list