mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
Detach dead temporary variables from dag nodes.
This allows temporary variables that are used in multiple nodes to remain in the dag, but also will allow more freedom when generating code from the dag.
This commit is contained in:
parent
fe13f21d9d
commit
88b8bebe3c
1 changed files with 12 additions and 0 deletions
|
@ -350,6 +350,18 @@ dag_create (const flownode_t *flownode)
|
|||
// c = a ^ b
|
||||
// c = a (move) b (count)
|
||||
}
|
||||
for (d = dagnodes; d; d = d->next) {
|
||||
daglabel_t **l = &d->identifiers;
|
||||
|
||||
while (*l) {
|
||||
if ((*l)->op->op_type == op_temp
|
||||
&& !set_is_member (flownode->live_vars.out,
|
||||
flow_get_var ((*l)->op)->number))
|
||||
daglabel_detatch (*l);
|
||||
else
|
||||
l = &(*l)->next;
|
||||
}
|
||||
}
|
||||
while (dagnodes->is_child) {
|
||||
dagnode_t *n = dagnodes->next;
|
||||
dagnodes->next = 0;
|
||||
|
|
Loading…
Reference in a new issue