aco: print ACO IR before scheduling instead of after
authorRhys Perry <pendingchaos02@gmail.com>
Tue, 18 Feb 2020 16:10:46 +0000 (16:10 +0000)
committerMarge Bot <eric+marge@anholt.net>
Tue, 21 Jul 2020 19:38:43 +0000 (19:38 +0000)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6013>

src/amd/compiler/aco_interface.cpp

index a05df1e7959ba9d380d38986470d8a96fcc6f57b..6d54cc895629adabf93c57c48cf1027f2653fc12 100644 (file)
@@ -95,10 +95,6 @@ void aco_compile_shader(unsigned shader_count,
    /* 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());
-   aco::schedule_program(program.get(), live_vars);
-   validate(program.get());
 
    std::string llvm_ir;
    if (args->options->record_ir) {
@@ -115,6 +111,11 @@ void aco_compile_shader(unsigned shader_count,
       free(data);
    }
 
+   if (program->collect_statistics)
+      aco::collect_presched_stats(program.get());
+   aco::schedule_program(program.get(), live_vars);
+   validate(program.get());
+
    /* Register Allocation */
    aco::register_allocation(program.get(), live_vars.live_out);
    if (args->options->dump_shader) {