projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
clarify some node comments
[libfirm]
/
ir
/
opt
/
opt_osr.c
diff --git
a/ir/opt/opt_osr.c
b/ir/opt/opt_osr.c
index
569d9d0
..
cdab220
100644
(file)
--- a/
ir/opt/opt_osr.c
+++ b/
ir/opt/opt_osr.c
@@
-22,7
+22,6
@@
* @brief Operator Strength Reduction.
* @date 12.5.2006
* @author Michael Beck
* @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.
* @brief
* Implementation of the Operator Strength Reduction algorithm
* by Keith D. Cooper, L. Taylor Simpson, Christopher A. Vick.
@@
-46,6
+45,7
@@
#include "set.h"
#include "tv.h"
#include "hashptr.h"
#include "set.h"
#include "tv.h"
#include "hashptr.h"
+#include "util.h"
#include "irtools.h"
#include "irloop_t.h"
#include "array.h"
#include "irtools.h"
#include "irloop_t.h"
#include "array.h"
@@
-1155,6
+1155,12
@@
static ir_node *applyOneEdge(ir_node *iv, ir_node *rc, LFTR_edge *e, iv_env *env
panic("Unsupported opcode");
}
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 {
if (pscc->code == iro_Add) {
tv_end = tarval_add(tv, tv_incr);
} else {
@@
-1164,7
+1170,7
@@
static ir_node *applyOneEdge(ir_node *iv, ir_node *rc, LFTR_edge *e, iv_env *env
tarval_set_integer_overflow_mode(ovmode);
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;
}
DB((dbg, LEVEL_4, " = OVERFLOW"));
return NULL;
}