~mmach/netext73/mesa-ryzen

« back to all changes in this revision

Viewing changes to src/compiler/nir/nir_lower_continue_constructs.c

  • Committer: mmach
  • Date: 2023-11-02 21:31:35 UTC
  • Revision ID: netbit73@gmail.com-20231102213135-18d4tzh7tj0uz752
2023-11-02 22:11:57

Show diffs side-by-side

added added

removed removed

Lines of Context:
136
136
static bool
137
137
lower_continue_constructs_impl(nir_function_impl *impl)
138
138
{
139
 
   nir_builder b;
140
 
   nir_builder_init(&b, impl);
 
139
   nir_builder b = nir_builder_create(impl);
141
140
   bool repair_ssa = false;
142
141
   bool progress = visit_cf_list(&b, &impl->body, &repair_ssa);
143
142
 
145
144
      nir_metadata_preserve(impl, nir_metadata_none);
146
145
 
147
146
      /* Merge the Phis from Header and Continue Target */
148
 
      nir_lower_regs_to_ssa_impl(impl);
 
147
      nir_lower_reg_intrinsics_to_ssa_impl(impl);
149
148
 
150
149
      /* Re-inserting the Continue Target at the beginning of the loop
151
150
       * violates the dominance property if instructions in the continue
165
164
{
166
165
   bool progress = false;
167
166
 
168
 
   nir_foreach_function(function, shader) {
169
 
      if (function->impl && lower_continue_constructs_impl(function->impl))
 
167
   nir_foreach_function_impl(impl, shader) {
 
168
      if (lower_continue_constructs_impl(impl))
170
169
         progress = true;
171
170
   }
172
171