Jason Ekstrand <ja...@jlekstrand.net> writes: >> >> +static bool >> >> +remove_dead_write_vars_local(struct state *state, nir_block *block) >> >> +{ >> >> + bool progress = false; >> >> + >> >> + struct util_dynarray unused_writes; >> >> + util_dynarray_init(&unused_writes, state->mem_ctx); >> >> + >> >> + nir_foreach_instr_safe(instr, block) { >> >> >> > >> > It wouldn't hurt to add a case for call instructions which does a barrier >> > on everything I mentioned below as well as globals and locals. >> >> Makes sense. But I don't get locals are affect? Is this to cover the >> parameters being passed to the call? >> > > Because a deref to a local might be passed in as a parameter. This is the > way pass-by-reference works for SPIR-V.
Will the parameter appear to the new function as local too? If so, will they be tagged in a way I can identify the derefs? I'm thinking about what to do with unused writes for locals at the end of a function. If it's the main function, we can just remove them, but depending on the answer of the question above, it is not so clear for non-main functions. Thanks, Caio _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev