* Copyright: (c) 2004 Universität Karlsruhe
* Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
# include "strength_red.h"
* @verbatim
*
* init
- * /|\
+ * ^
* |
* +-- Phi
- * | /|\
+ * | ^
* | |
* +-->op
*
/* check if a iteration variable be reduced.*/
int reduced = 0;
- if (get_irn_op(itervar_phi) != op_Phi)
+ if (! is_Phi(itervar_phi))
return;
- /* A candidate is found.*/
+
+ /* A potential candidate is found.*/
ivi.itervar_phi = itervar_phi;
- /* It musss be a induction variable.*/
+ /* check if it's a induction variable.*/
if (is_induction_variable(&ivi)) {
int i, op_out;
/* Call algorithm that computes the backedges */
construct_cf_backedges(irg);
/* Call algorithm that computes the dominator trees. */
- compute_doms(irg);
+ assure_doms(irg);
/* Call algorithm that computes the out edges */
- compute_irg_outs(irg);
+ assure_irg_outs(irg);
/* -- Search expressions that can be optimized -- */
irg_walk_graph(irg, NULL, reduce_itervar, NULL);