Ensure the def is aliasing before adding edges.

Getting two nodes doubly connected for *to = *from++; was interesting.
This commit is contained in:
Bill Currie 2012-12-12 12:52:01 +09:00
parent 75be251d65
commit 03fdbe9b86

View file

@ -339,7 +339,8 @@ dagnode_set_edges (dagnode_t *n)
operand_t *op = child->label->op;
if (node != child && node != n)
set_add (node->edges, n->number);
if (op->op_type == op_def)
if (op->op_type == op_def
&& (op->o.def->alias || op->o.def->alias_defs))
def_visit_all (op->o.def, 1, dagnode_set_edges_visit, n);
}
if (n != child)