aco: Call dominator_tree before lower_phis.
authorTimur Kristóf <timur.kristof@gmail.com>
Tue, 21 Feb 2023 13:33:58 +0000 (14:33 +0100)
committerMarge Bot <emma+marge@anholt.net>
Mon, 3 Apr 2023 14:36:07 +0000 (14:36 +0000)
This just makes it possible to use the dominator
tree information during phi lowering.

No Fossil DB changes on GFX11.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21493>

src/amd/compiler/aco_interface.cpp

index c8bc0ba..661ceb1 100644 (file)
@@ -121,9 +121,8 @@ aco_postprocess_shader(const struct aco_compiler_options* options,
 
    aco::live live_vars;
    if (!info->is_trap_handler_shader) {
-      /* Phi lowering */
-      aco::lower_phis(program.get());
       aco::dominator_tree(program.get());
+      aco::lower_phis(program.get());
       validate(program.get());
 
       /* Optimization */