mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
Set def after setting use.
An instruction that both reads and writes the same variable will read the variable before writing to it, so the instruction uses the variable rather than defines it (for live-variable purposes).
This commit is contained in:
parent
58cb73d6aa
commit
e3a49df0a8
1 changed files with 1 additions and 1 deletions
|
@ -287,9 +287,9 @@ flow_live_vars (flowgraph_t *graph)
|
|||
def = set_new ();
|
||||
for (st = node->sblock->statements; st; st = st->next) {
|
||||
find_operands (st, &d, &u[0], &u[1], &u[2]);
|
||||
live_set_def (flow_get_var (d), use, def);
|
||||
for (j = 0; j < 3; j++)
|
||||
live_set_use (flow_get_var (u[j]), use, def);
|
||||
live_set_def (flow_get_var (d), use, def);
|
||||
}
|
||||
node->live_vars.use = use;
|
||||
node->live_vars.def = def;
|
||||
|
|
Loading…
Reference in a new issue