Commit d1b878fb authored by yb9976's avatar yb9976
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) ...@@ -175,7 +175,11 @@ ir_node *be_transform_node(ir_node *node)
if (be_is_transformed(node)) { if (be_is_transformed(node)) {
new_node = (ir_node*)get_irn_link(node); new_node = (ir_node*)get_irn_link(node);
} else { } else {
DEBUG_ONLY(be_set_transformed_node(node, NULL);) #ifdef DEBUG_libfirm
be_set_transformed_node(node, NULL);
ir_op *const op = get_irn_op(node); ir_op *const op = get_irn_op(node);
be_transform_func *const transform = (be_transform_func*)op->ops.generic; 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