X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fopt%2Fstrength_red.h;h=481b7e2ddcce541848f1af457b8c7c929ede50d7;hb=b73f55938b96a97a0c9322f22e18258e50546c93;hp=eab6f2fe78f8fb7ffefc038965aba0ae611753bf;hpb=d957d95d2acb2d73015af7458949938161a6dd8f;p=libfirm diff --git a/ir/opt/strength_red.h b/ir/opt/strength_red.h index eab6f2fe7..481b7e2dd 100644 --- a/ir/opt/strength_red.h +++ b/ir/opt/strength_red.h @@ -7,9 +7,9 @@ * Purpose: Strength reduction. * Author: Beyhan Veliev * Modified by: - * Created: 22.8.2003 + * Created: 22.8.2004 * CVS-ID: $Id$ - * Copyright: (c) 2003 Universität Karlsruhe + * Copyright: (c) 2004 Universität Karlsruhe * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. * * @@ -21,11 +21,28 @@ # ifndef _STRENGTH_RED_H_ # define _STRENGTH_RED_H_ -# include "irgraph.h" +#include "irnode.h" +#include "irgraph.h" +#include "irloop.h" /** Performs strength reduction for the passed graph. */ void reduce_strength(ir_graph *irg); +/* The information needed for an induction variable */ +# ifndef _STRENGTH_RED_TYP_ +# define _STRENGTH_RED_TYP_ +typedef struct _induct_var_info { + ir_op *operation_code; + ir_node *increment, *init, *op, *itervar_phi, *c, *new_phi, *new_increment, *new_init; + ir_node *new_op, *new_add, *reducible_node; + ir_node *old_ind, *symconst, *new_cmp, *cmp_const, *cmp_init_block, *cmp; + int be_pos, strong_reduced; + int init_pred_pos, op_pred_pos, out_loop_res, phi_pred, reducible; + ir_loop *l_itervar_phi; +}induct_var_info; +#endif +/** If an ir_node is induction variable return info else return NULL. */ +induct_var_info *is_induction_variable ( induct_var_info *info); #endif /* _STRENGTH_RED_H_ */