aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDaniel Schürmann <[email protected]>2020-06-16 10:03:00 +0100
committerDaniel Schürmann <[email protected]>2020-06-16 14:46:19 +0100
commit0e47fe3fa216e5ce76b3e3a289c986539d7d34c6 (patch)
tree609139e2fe478a4f3fda5e420ffa24a4cc60bc7b /src
parentec628aba76e3526d85938ec12870267c34806a1d (diff)
aco: reorder calls to aco_validate() and cleanup aco_compile_shader()
The first call of aco_validate should happen after phi lowering. Otherwise, subdword restrictions might be violated Reviewed-by: Rhys Perry <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5496>
Diffstat (limited to 'src')
-rw-r--r--src/amd/compiler/aco_interface.cpp22
1 files changed, 7 insertions, 15 deletions
diff --git a/src/amd/compiler/aco_interface.cpp b/src/amd/compiler/aco_interface.cpp
index 3031bb43f7a..da9476deb32 100644
--- a/src/amd/compiler/aco_interface.cpp
+++ b/src/amd/compiler/aco_interface.cpp
@@ -91,33 +91,28 @@ void aco_compile_shader(unsigned shader_count,
std::cerr << "After Instruction Selection:\n";
aco_print_program(program.get(), stderr);
}
- aco::validate(program.get(), stderr);
/* Phi lowering */
aco::lower_phis(program.get());
- //std::cerr << "After Phi Lowering:\n";
- //aco_print_program(program.get(), stderr);
-
aco::dominator_tree(program.get());
+ aco::validate(program.get(), stderr);
/* Optimization */
aco::value_numbering(program.get());
aco::optimize(program.get());
- aco::validate(program.get(), stderr);
+ /* cleanup and exec mask handling */
aco::setup_reduce_temp(program.get());
aco::insert_exec_mask(program.get());
aco::validate(program.get(), stderr);
+ /* spilling and scheduling */
aco::live live_vars = aco::live_var_analysis(program.get(), args->options);
aco::spill(program.get(), live_vars, args->options);
-
if (program->collect_statistics)
aco::collect_presched_stats(program.get());
-
- //std::cerr << "Before Schedule:\n";
- //aco_print_program(program.get(), stderr);
aco::schedule_program(program.get(), live_vars);
+ aco::validate(program.get(), stderr);
std::string llvm_ir;
if (args->options->record_ir) {
@@ -147,19 +142,16 @@ void aco_compile_shader(unsigned shader_count,
abort();
}
- aco::ssa_elimination(program.get());
+ aco::validate(program.get(), stderr);
+
/* Lower to HW Instructions */
+ aco::ssa_elimination(program.get());
aco::lower_to_hw_instr(program.get());
- //std::cerr << "After Eliminate Pseudo Instr:\n";
- //aco_print_program(program.get(), stderr);
/* Insert Waitcnt */
aco::insert_wait_states(program.get());
aco::insert_NOPs(program.get());
- //std::cerr << "After Insert-Waitcnt:\n";
- //aco_print_program(program.get(), stderr);
-
if (program->collect_statistics)
aco::collect_preasm_stats(program.get());