typedef enum {
NO_CONSTANT = 0, /**< node is not constant */
REAL_CONSTANT = 1, /**< node is a constnt that is suitable for constant folding */
- CONST_EXPR = 4 /**< node is not constnt expression in the current context,
+ CONST_EXPR = 4 /**< node is not constant expression in the current context,
use 4 here to simplify implementation of get_comm_Binop_ops() */
} const_class_t;
/**
- * returns wheater a node is constant, ie is a constant or
+ * returns whether a node is constant, ie is a constant or
* is loop invariant
*/
static const_class_t get_const_class(ir_node *n)
}
#define reassoc_Add reassoc_commutative
+#define reassoc_And reassoc_commutative
+#define reassoc_Or reassoc_commutative
+#define reassoc_Eor reassoc_commutative
/**
* reassociate using distibutive law for Mul and Add/Sub
walker_t *wenv = env;
int res;
+ stat_reassociate(1);
+
/* reassociation must run until fixpoint */
do {
ir_op *op = get_irn_op(n);
}
}
} while (res == 1);
+
+ stat_reassociate(0);
}
/*
INIT(Mul);
INIT(Add);
INIT(Sub);
+ INIT(And);
+ INIT(Or);
+ INIT(Eor);
#undef CASE
}