# include "tv.h"
# include "tune.h"
# include "dbginfo_t.h"
-# include "iropt_dbg.c"
+# include "iropt_dbg.h"
/* Make types visible to allow most efficient access */
# include "entity_t.h"
return tarval_bad;
}
-/* if n can be computed, return the value, else NULL. Performs
+/* if n can be computed, return the value, else tarval_bad. Performs
constant folding. GL: Only if n is arithmetic operator? */
tarval *
computed_value (ir_node *n)
ir_node *on;
/* After running compute_node there is only one constant predecessor.
Find this predecessors value and remember the other node: */
- if ((tv = computed_value (a))) {
+ if ((tv = computed_value (a)) != tarval_bad) {
on = b;
- } else if ((tv = computed_value (b))) {
+ } else if ((tv = computed_value (b)) != tarval_bad) {
on = a;
} else break;
jmp = new_r_Jmp(current_ir_graph, get_nodes_Block(n));
turn_into_tuple(n, 2);
if (ta == tarval_b_true) {
- set_Tuple_pred(n, 0, new_Bad());
- set_Tuple_pred(n, 1, jmp);
+ set_Tuple_pred(n, 0, new_Bad());
+ set_Tuple_pred(n, 1, jmp);
} else {
- set_Tuple_pred(n, 0, jmp);
- set_Tuple_pred(n, 1, new_Bad());
+ set_Tuple_pred(n, 0, jmp);
+ set_Tuple_pred(n, 1, new_Bad());
}
/* We might generate an endless loop, so keep it alive. */
add_End_keepalive(get_irg_end(current_ir_graph), get_nodes_Block(n));