mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 04:42:32 +00:00
Use define from temp aliases as well to kill uninit defines.
Finally, the uninitialized temp warnings are fixed.
This commit is contained in:
parent
5083679fcc
commit
50b0bd0b95
1 changed files with 12 additions and 0 deletions
|
@ -616,6 +616,7 @@ flow_uninit_scan_statements (flownode_t *node, set_t *defs, set_t *uninit)
|
|||
statement_t *st;
|
||||
set_iter_t *var_i;
|
||||
flowvar_t *var;
|
||||
operand_t *op;
|
||||
|
||||
// defs holds only reaching definitions. make it hold only reaching
|
||||
// uninitialized definitions
|
||||
|
@ -643,6 +644,17 @@ flow_uninit_scan_statements (flownode_t *node, set_t *defs, set_t *uninit)
|
|||
var = node->graph->func->vars[var_i->value];
|
||||
// kill any reaching uninitialized definitions for this variable
|
||||
set_difference (defs, var->define);
|
||||
if (var->op->op_type == op_temp) {
|
||||
op = var->op;
|
||||
if (op->o.tempop.alias) {
|
||||
var = op->o.tempop.alias->o.tempop.flowvar;
|
||||
set_difference (defs, var->define);
|
||||
}
|
||||
for (op = op->o.tempop.alias_ops; op; op = op->next) {
|
||||
var = op->o.tempop.flowvar;
|
||||
set_difference (defs, var->define);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
set_delete (stuse);
|
||||
|
|
Loading…
Reference in a new issue