Commit d1b878fb authored by sebastian.buchwald1's avatar sebastian.buchwald1
Browse files

Mark node as visited before actually transforming it.

This unifies the behavior in debug and optimize build, since
be_set_transformed_node also marks the node as visited.
Furthermore, nobody should call be_is_transformed for the current node,
since this would mean we ran into a cycle (which is covered by an assert in the
debug build).
parent 1dee355e
......@@ -175,7 +175,11 @@ ir_node *be_transform_node(ir_node *node)
if (be_is_transformed(node)) {
new_node = (ir_node*)get_irn_link(node);
} else {
DEBUG_ONLY(be_set_transformed_node(node, NULL);)
#ifdef DEBUG_libfirm
be_set_transformed_node(node, NULL);
#else
mark_irn_visited(node);
#endif
ir_op *const op = get_irn_op(node);
be_transform_func *const transform = (be_transform_func*)op->ops.generic;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment