From b398230e6d7412e468985dcc9c7804e8e637674b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nicolai=20H=C3=A4hnle?= Date: Mon, 1 Jul 2019 16:55:28 +0200 Subject: [PATCH] amd/common: remove unused ac_compile_module_to_binary MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Bas Nieuwenhuizen Reviewed-by: Samuel Pitoiset Reviewed-by: Marek Olšák --- src/amd/common/ac_llvm_helper.cpp | 14 -------------- src/amd/common/ac_llvm_util.h | 2 -- 2 files changed, 16 deletions(-) diff --git a/src/amd/common/ac_llvm_helper.cpp b/src/amd/common/ac_llvm_helper.cpp index 533baf3be04..d392c0ece7f 100644 --- a/src/amd/common/ac_llvm_helper.cpp +++ b/src/amd/common/ac_llvm_helper.cpp @@ -210,20 +210,6 @@ void ac_destroy_llvm_passes(struct ac_compiler_passes *p) delete p; } -/* This returns false on failure. */ -bool ac_compile_module_to_binary(struct ac_compiler_passes *p, LLVMModuleRef module, - struct ac_shader_binary *binary) -{ - p->passmgr.run(*llvm::unwrap(module)); - - bool success = ac_elf_read(p->ostream.buffer, p->ostream.written, binary); - p->ostream.clear(); - - if (!success) - fprintf(stderr, "amd: cannot read an ELF shader binary\n"); - return success; -} - /* This returns false on failure. */ bool ac_compile_module_to_elf(struct ac_compiler_passes *p, LLVMModuleRef module, char **pelf_buffer, size_t *pelf_size) diff --git a/src/amd/common/ac_llvm_util.h b/src/amd/common/ac_llvm_util.h index d2e3c85cfab..b0f8fc6b8cc 100644 --- a/src/amd/common/ac_llvm_util.h +++ b/src/amd/common/ac_llvm_util.h @@ -135,8 +135,6 @@ void ac_destroy_llvm_compiler(struct ac_llvm_compiler *compiler); struct ac_compiler_passes *ac_create_llvm_passes(LLVMTargetMachineRef tm); void ac_destroy_llvm_passes(struct ac_compiler_passes *p); -bool ac_compile_module_to_binary(struct ac_compiler_passes *p, LLVMModuleRef module, - struct ac_shader_binary *binary); bool ac_compile_module_to_elf(struct ac_compiler_passes *p, LLVMModuleRef module, char **pelf_buffer, size_t *pelf_size); void ac_llvm_add_barrier_noop_pass(LLVMPassManagerRef passmgr); -- 2.30.2