amd: remove the redundant target library info instance in LLVM compiler
Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30506>
This commit is contained in:

committed by
Marge Bot

parent
0a352a838a
commit
cc27e3ea29
@@ -164,17 +164,6 @@ void ac_disable_signed_zeros(struct ac_llvm_context *ctx)
|
||||
}
|
||||
}
|
||||
|
||||
LLVMTargetLibraryInfoRef ac_create_target_library_info(const char *triple)
|
||||
{
|
||||
return reinterpret_cast<LLVMTargetLibraryInfoRef>(
|
||||
new TargetLibraryInfoImpl(Triple(triple)));
|
||||
}
|
||||
|
||||
void ac_dispose_target_library_info(LLVMTargetLibraryInfoRef library_info)
|
||||
{
|
||||
delete reinterpret_cast<TargetLibraryInfoImpl *>(library_info);
|
||||
}
|
||||
|
||||
/* Implementation of raw_pwrite_stream that works on malloc()ed memory for
|
||||
* better compatibility with C code. */
|
||||
struct raw_memory_ostream : public raw_pwrite_stream {
|
||||
|
@@ -178,10 +178,6 @@ bool ac_init_llvm_compiler(struct ac_llvm_compiler *compiler, enum radeon_family
|
||||
goto fail;
|
||||
}
|
||||
|
||||
compiler->target_library_info = ac_create_target_library_info(triple);
|
||||
if (!compiler->target_library_info)
|
||||
goto fail;
|
||||
|
||||
compiler->meo =
|
||||
ac_create_midend_optimizer(compiler->tm, tm_options & AC_TM_CHECK_IR);
|
||||
if (!compiler->meo)
|
||||
@@ -203,8 +199,6 @@ void ac_destroy_llvm_compiler(struct ac_llvm_compiler *compiler)
|
||||
if (compiler->meo)
|
||||
ac_destroy_midend_optimiser(compiler->meo);
|
||||
|
||||
if (compiler->target_library_info)
|
||||
ac_dispose_target_library_info(compiler->target_library_info);
|
||||
if (compiler->low_opt_tm)
|
||||
LLVMDisposeTargetMachine(compiler->low_opt_tm);
|
||||
if (compiler->tm)
|
||||
|
@@ -43,8 +43,6 @@ enum ac_float_mode
|
||||
|
||||
/* Per-thread persistent LLVM objects. */
|
||||
struct ac_llvm_compiler {
|
||||
LLVMTargetLibraryInfoRef target_library_info;
|
||||
|
||||
/* Default compiler. */
|
||||
LLVMTargetMachineRef tm;
|
||||
struct ac_midend_optimizer *meo;
|
||||
@@ -77,8 +75,6 @@ void ac_llvm_add_target_dep_function_attr(LLVMValueRef F, const char *name, unsi
|
||||
void ac_llvm_set_workgroup_size(LLVMValueRef F, unsigned size);
|
||||
void ac_llvm_set_target_features(LLVMValueRef F, struct ac_llvm_context *ctx, bool wgp_mode);
|
||||
|
||||
LLVMTargetLibraryInfoRef ac_create_target_library_info(const char *triple);
|
||||
void ac_dispose_target_library_info(LLVMTargetLibraryInfoRef library_info);
|
||||
PUBLIC void ac_init_shared_llvm_once(void); /* Do not use directly, use ac_init_llvm_once */
|
||||
void ac_init_llvm_once(void);
|
||||
|
||||
|
Reference in New Issue
Block a user