diff options
author | Marek Olšák <[email protected]> | 2015-12-27 21:57:40 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-01-03 22:41:16 +0100 |
commit | fb98acb5a156ce7b50938cc50fc61f8560c8f7f2 (patch) | |
tree | 75f5d6f784b30d535f7344acaff1fd9f5f9d675a | |
parent | cd7f252b114b7771cde9bba698eddaa1b4b93ab4 (diff) |
gallium/radeon: always add +DumpCode to the LLVM target machine for LLVM <= 3.5
It's the same behavior that we use for later LLVM.
Reviewed-by: Edward O'Callaghan <[email protected]>
Reviewed-by: Nicolai Hähnle <[email protected]>
-rw-r--r-- | src/gallium/drivers/r600/r600_llvm.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/radeon/radeon_llvm_emit.c | 5 | ||||
-rw-r--r-- | src/gallium/drivers/radeon/radeon_llvm_emit.h | 2 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader.c | 2 |
4 files changed, 5 insertions, 6 deletions
diff --git a/src/gallium/drivers/r600/r600_llvm.c b/src/gallium/drivers/r600/r600_llvm.c index ef2e2a2a117..b8a20b36af2 100644 --- a/src/gallium/drivers/r600/r600_llvm.c +++ b/src/gallium/drivers/r600/r600_llvm.c @@ -923,7 +923,7 @@ unsigned r600_llvm_compile( const char * gpu_family = r600_get_llvm_processor_name(family); memset(&binary, 0, sizeof(struct radeon_shader_binary)); - r = radeon_llvm_compile(mod, &binary, gpu_family, dump, dump, NULL, debug); + r = radeon_llvm_compile(mod, &binary, gpu_family, dump, NULL, debug); r = r600_create_shader(bc, &binary, use_kill); diff --git a/src/gallium/drivers/radeon/radeon_llvm_emit.c b/src/gallium/drivers/radeon/radeon_llvm_emit.c index b765d367dab..408e8156106 100644 --- a/src/gallium/drivers/radeon/radeon_llvm_emit.c +++ b/src/gallium/drivers/radeon/radeon_llvm_emit.c @@ -172,7 +172,7 @@ static void radeonDiagnosticHandler(LLVMDiagnosticInfoRef di, void *context) * @returns 0 for success, 1 for failure */ unsigned radeon_llvm_compile(LLVMModuleRef M, struct radeon_shader_binary *binary, - const char *gpu_family, bool dump_ir, bool dump_asm, + const char *gpu_family, bool dump_ir, LLVMTargetMachineRef tm, struct pipe_debug_callback *debug) { @@ -199,8 +199,7 @@ unsigned radeon_llvm_compile(LLVMModuleRef M, struct radeon_shader_binary *binar } strncpy(cpu, gpu_family, CPU_STRING_LEN); memset(fs, 0, sizeof(fs)); - if (dump_asm) - strncpy(fs, "+DumpCode", FS_STRING_LEN); + strncpy(fs, "+DumpCode", FS_STRING_LEN); tm = LLVMCreateTargetMachine(target, triple, cpu, fs, LLVMCodeGenLevelDefault, LLVMRelocDefault, LLVMCodeModelDefault); diff --git a/src/gallium/drivers/radeon/radeon_llvm_emit.h b/src/gallium/drivers/radeon/radeon_llvm_emit.h index 29e4dc05a3d..4084740f457 100644 --- a/src/gallium/drivers/radeon/radeon_llvm_emit.h +++ b/src/gallium/drivers/radeon/radeon_llvm_emit.h @@ -39,7 +39,7 @@ void radeon_llvm_shader_type(LLVMValueRef F, unsigned type); LLVMTargetRef radeon_llvm_get_r600_target(const char *triple); unsigned radeon_llvm_compile(LLVMModuleRef M, struct radeon_shader_binary *binary, - const char *gpu_family, bool dump_ir, bool dump_asm, + const char *gpu_family, bool dump_ir, LLVMTargetMachineRef tm, struct pipe_debug_callback *debug); diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 37a753c18f1..4fdcd0dcaba 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -3931,7 +3931,7 @@ int si_compile_llvm(struct si_screen *sscreen, struct si_shader *shader, if (!si_replace_shader(count, &shader->binary)) { r = radeon_llvm_compile(mod, &shader->binary, - r600_get_llvm_processor_name(sscreen->b.family), dump_ir, dump_asm, tm, + r600_get_llvm_processor_name(sscreen->b.family), dump_ir, tm, debug); if (r) return r; |