diff options
author | Rhys Perry <[email protected]> | 2019-05-22 20:23:03 +0100 |
---|---|---|
committer | Rhys Perry <[email protected]> | 2019-08-12 22:01:30 +0000 |
commit | da8ed68aca1b077fcbb8da429d8bcea785eeec10 (patch) | |
tree | 7dad83058b603b780f1016c0f43ea1b1326fecdf /src/freedreno | |
parent | c2fe7a0fb818578d87f12300523d796205edffd5 (diff) |
nir: replace nir_move_load_const() with nir_opt_sink()
This is mostly the same as nir_move_load_const() but can also move
undef instructions, comparisons and some intrinsics (being careful with
loops).
v2: actually delete nir_move_load_const.c
v3: fix nir_opt_sink() usage in freedreno
v3: update Makefile.sources
v4: replace get_move_def with nir_can_move_instr and nir_instr_ssa_def
v4: handle if uses
v4: fix handling of nested loops
v5: re-write adjust_block_for_loops
v5: re-write setting of use_block for if uses
Signed-off-by: Rhys Perry <[email protected]>
Co-authored-by: Daniel Schürmann <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/freedreno')
-rw-r--r-- | src/freedreno/ir3/ir3_nir.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/freedreno/ir3/ir3_nir.c b/src/freedreno/ir3/ir3_nir.c index 6a4c60b0c1f..260702ba3c7 100644 --- a/src/freedreno/ir3/ir3_nir.c +++ b/src/freedreno/ir3/ir3_nir.c @@ -264,7 +264,7 @@ ir3_optimize_nir(struct ir3_shader *shader, nir_shader *s, OPT_V(s, nir_remove_dead_variables, nir_var_function_temp); - OPT_V(s, nir_move_load_const); + OPT_V(s, nir_opt_sink, nir_move_const_undef); if (ir3_shader_debug & IR3_DBG_DISASM) { debug_printf("----------------------\n"); |