summaryrefslogtreecommitdiffhomepage
path: root/ir/be/betranshlp.c
diff options
context:
space:
mode:
authorSebastian Buchwald <Sebastian.Buchwald@kit.edu>2015-09-14 14:33:01 +0200
committerSebastian Buchwald <Sebastian.Buchwald@kit.edu>2015-09-14 14:38:37 +0200
commitd1b878fbf3b4e685569bc62877ce300555adef04 (patch)
treea6cbd5ced2c50d9e78e7a2176f4afdf26431d418 /ir/be/betranshlp.c
parent1dee355efa10c38d5b674cddd2f3728b50de8f00 (diff)
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).
Diffstat (limited to 'ir/be/betranshlp.c')
-rw-r--r--ir/be/betranshlp.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ir/be/betranshlp.c b/ir/be/betranshlp.c
index 5ee5d33..15b28de 100644
--- a/ir/be/betranshlp.c
+++ b/ir/be/betranshlp.c
@@ -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;