freedreno: a2xx: add ir2 copy propagation
[mesa.git] / src / gallium / drivers / freedreno / a2xx / ir2.c
index 4d00dd5db2676c31055b368a2c0321fa2923c28e..8995d7e8aaf90b9e0453e9a01ea9c077187ff097 100644 (file)
@@ -425,9 +425,15 @@ ir2_compile(struct fd2_shader_stateobj *so, unsigned variant,
        /* convert nir to internal representation */
        ir2_nir_compile(&ctx, binning);
 
+       /* copy propagate srcs */
+       cp_src(&ctx);
+
        /* get ref_counts and kill non-needed instructions */
        ra_count_refs(&ctx);
 
+       /* remove movs used to write outputs */
+       cp_export(&ctx);
+
        /* instruction order.. and vector->scalar conversions */
        schedule_instrs(&ctx);