mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 11:00:11 +01:00
vc4: Reuse list_for_each_entry_safe_rev().
This didn't exist when I wrote the code.
This commit is contained in:
parent
b566317e7e
commit
a298fb15af
1 changed files with 2 additions and 6 deletions
|
|
@ -86,12 +86,8 @@ qir_opt_dead_code(struct vc4_compile *c)
|
|||
/* Whether we're eliminating texture setup currently. */
|
||||
bool dce_tex = false;
|
||||
|
||||
struct list_head *node, *t;
|
||||
for (node = c->instructions.prev, t = node->prev;
|
||||
&c->instructions != node;
|
||||
node = t, t = t->prev) {
|
||||
struct qinst *inst = (struct qinst *)node;
|
||||
|
||||
list_for_each_entry_safe_rev(struct qinst, inst, &c->instructions,
|
||||
link) {
|
||||
if (inst->dst.file == QFILE_TEMP &&
|
||||
!used[inst->dst.index] &&
|
||||
!inst->sf &&
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue