/* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe
-** All rights reserved.
-**
-** Authors: Christian Schaefer, Goetz Lindenmaier
-**
-** iropt --- optimizations intertwined with IR construction.
+* All rights reserved.
+*
+* Authors: Christian Schaefer, Goetz Lindenmaier
+*
+* iropt --- optimizations intertwined with IR construction.
*/
/* $Id$ */
} /* compute node */
-
+#if 0
/* returns 1 if the a and b are pointers to different locations. */
static bool
different_identity (ir_node *a, ir_node *b)
}
return 0;
}
-
+#endif
/* equivalent_node returns a node equivalent to N. It skips all nodes that
perform no actual computation, as, e.g., the Id nodes. It does not create
case iro_Minus: /* --x == x */ /* ??? Is this possible or can --x raise an
out of bounds exception if min =! max? */
if (get_irn_op(get_unop_op(n)) == get_irn_op(n)) {
- n = get_unop_op(get_unop_op(n)); DBG_OPT_ALGSIM2
+ n = get_unop_op(get_unop_op(n)); DBG_OPT_ALGSIM2;
}
break;
case iro_Mul:
/* Mul is commutative and has again an other neutral element. */
if (tarval_classify (computed_value (a)) == 1) {
- n = b; DBG_OPT_ALGSIM1
+ n = b; DBG_OPT_ALGSIM1;
} else if (tarval_classify (computed_value (b)) == 1) {
- n = a; DBG_OPT_ALGSIM1
+ n = a; DBG_OPT_ALGSIM1;
}
break;
case iro_Div:
ir_node *first_val = NULL; /* to shutup gcc */
ir_node *scnd_val = NULL; /* to shutup gcc */
+ if (!get_opt_normalize()) return;
+
n_preds = get_Phi_n_preds(n);
block = get_nodes_Block(n);
It can only be called if it is guaranteed that no other nodes
reference this one, i.e., right after construction of a node. */
ir_node *
-optimize (ir_node *n)
+optimize_node (ir_node *n)
{
tarval *tv;
ir_node *old_n = n;