6 * File name: ir/opt/strenth_red.h
7 * Purpose: Strength reduction.
8 * Author: Beyhan Veliev
12 * Copyright: (c) 2004 Universität Karlsruhe
13 * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
21 # ifndef _STRENGTH_RED_H_
22 # define _STRENGTH_RED_H_
28 /** Performs strength reduction for the passed graph. */
29 void reduce_strength(ir_graph *irg);
31 /* The information needed for an induction variable */
32 # ifndef _STRENGTH_RED_TYP_
33 # define _STRENGTH_RED_TYP_
34 typedef struct _induct_var_info {
35 ir_op *operation_code;
36 ir_node *increment, *init, *op, *itervar_phi, *c, *new_phi, *new_increment, *new_init;
37 ir_node *new_op, *new_add, *reducible_node;
38 ir_node *old_ind, *symconst, *new_cmp, *cmp_const, *cmp_init_block, *cmp;
39 int be_pos, strong_reduced;
40 int init_pred_pos, op_pred_pos, out_loop_res, phi_pred, reducible;
41 ir_loop *l_itervar_phi;
45 /** If an ir_node is induction variable return info else return NULL. */
46 induct_var_info *is_induction_variable ( induct_var_info *info);
48 #endif /* _STRENGTH_RED_H_ */