* @brief Operator Strength Reduction.
* @date 12.5.2006
* @author Michael Beck
- * @version $Id$
* @brief
* Implementation of the Operator Strength Reduction algorithm
* by Keith D. Cooper, L. Taylor Simpson, Christopher A. Vick.
#include "set.h"
#include "tv.h"
#include "hashptr.h"
+#include "util.h"
#include "irtools.h"
#include "irloop_t.h"
#include "array.h"
*/
static int check_users_for_reg_pressure(ir_node *iv, iv_env *env)
{
- ir_node *irn, *header;
+ ir_node *irn;
ir_node *have_user = NULL;
ir_node *have_cmp = NULL;
node_entry *e = get_irn_ne(iv, env);
scc *pscc = e->pscc;
- header = e->header;
for (irn = pscc->head; irn != NULL; irn = e->next) {
const ir_edge_t *edge;
panic("Unsupported opcode");
}
+ if (tv == tarval_bad || tv_init == tarval_bad) {
+ tarval_set_integer_overflow_mode(ovmode);
+ DB((dbg, LEVEL_4, " = OVERFLOW"));
+ return NULL;
+ }
+
if (pscc->code == iro_Add) {
tv_end = tarval_add(tv, tv_incr);
} else {
tarval_set_integer_overflow_mode(ovmode);
- if (tv == tarval_bad || tv_init == tarval_bad || tv_end == tarval_bad) {
+ if (tv_end == tarval_bad) {
DB((dbg, LEVEL_4, " = OVERFLOW"));
return NULL;
}