diff options
author | Marek Olšák <[email protected]> | 2017-04-28 20:23:19 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-05-05 00:23:44 +0200 |
commit | f8f8242e8b39fc5728d3b92b1cd3effcb29c6244 (patch) | |
tree | aa6446414bfa9eee5c6b55801e38595a23627801 /src/gallium/drivers/radeonsi/si_shader.c | |
parent | 5dad0c34773549df974f327d1e246ec776c7a1a4 (diff) |
radeonsi: fold surrounding code into si_llvm_finalize_module
and rename to si_llvm_optimize_module.
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_shader.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 2928fc9039c..736084f1ad1 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -7015,13 +7015,8 @@ si_generate_gs_copy_shader(struct si_screen *sscreen, LLVMBuildRetVoid(gallivm->builder); - /* Dump LLVM IR before any optimization passes */ - if (sscreen->b.debug_flags & DBG_PREOPT_IR && - r600_can_dump_shader(&sscreen->b, PIPE_SHADER_GEOMETRY)) - ac_dump_module(ctx.gallivm.module); - - si_llvm_finalize_module(&ctx, - r600_extra_shader_checks(&sscreen->b, PIPE_SHADER_GEOMETRY)); + ctx.type = PIPE_SHADER_GEOMETRY; /* override for shader dumping */ + si_llvm_optimize_module(&ctx); r = si_compile_llvm(sscreen, &ctx.shader->binary, &ctx.shader->config, ctx.tm, @@ -8152,13 +8147,7 @@ int si_compile_tgsi_shader(struct si_screen *sscreen, need_prolog ? 1 : 0, 0); } - /* Dump LLVM IR before any optimization passes */ - if (sscreen->b.debug_flags & DBG_PREOPT_IR && - r600_can_dump_shader(&sscreen->b, ctx.type)) - LLVMDumpModule(ctx.gallivm.module); - - si_llvm_finalize_module(&ctx, - r600_extra_shader_checks(&sscreen->b, ctx.type)); + si_llvm_optimize_module(&ctx); /* Post-optimization transformations and analysis. */ si_eliminate_const_vs_outputs(&ctx); @@ -8327,8 +8316,7 @@ si_get_shader_part(struct si_screen *sscreen, build(&ctx, key); /* Compile. */ - si_llvm_finalize_module(&ctx, - r600_extra_shader_checks(&sscreen->b, PIPE_SHADER_FRAGMENT)); + si_llvm_optimize_module(&ctx); if (si_compile_llvm(sscreen, &result->binary, &result->config, tm, gallivm->module, debug, ctx.type, name)) { |