ac: make some fns static
authorDave Airlie <airlied@redhat.com>
Wed, 27 Jun 2018 00:24:18 +0000 (10:24 +1000)
committerDave Airlie <airlied@redhat.com>
Wed, 4 Jul 2018 00:29:26 +0000 (10:29 +1000)
Some of the compiler functions are no longer called outside
the util file.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/amd/common/ac_llvm_util.c
src/amd/common/ac_llvm_util.h

index 2be2edf1e6acb9a58942eb91b961ab91b1a3894a..5e04452d5a89a3752b5abd22750e2ba86d4c4f6a 100644 (file)
@@ -67,7 +67,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;
@@ -133,9 +133,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];
@@ -165,8 +165,8 @@ LLVMTargetMachineRef ac_create_target_machine(enum radeon_family family,
        return tm;
 }
 
-LLVMPassManagerRef ac_create_passmgr(LLVMTargetLibraryInfoRef target_library_info,
-                                    bool check_ir)
+static LLVMPassManagerRef ac_create_passmgr(LLVMTargetLibraryInfoRef target_library_info,
+                                           bool check_ir)
 {
        LLVMPassManagerRef passmgr = LLVMCreatePassManager();
        if (!passmgr)
index ad463c695642efebf0dfe2de5ed337edcf47df73..c6ee537b74c65ed4a7a7096613a0441f8ff6fa82 100644 (file)
@@ -76,11 +76,6 @@ struct ac_llvm_compiler {
 };
 
 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,
@@ -119,8 +114,6 @@ ac_get_store_intr_attribs(bool writeonly_memory)
 unsigned
 ac_count_scratch_private_memory(LLVMValueRef function);
 
-LLVMPassManagerRef ac_create_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);