projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove unused variable.
[libfirm]
/
ir
/
opt
/
opt_osr.c
diff --git
a/ir/opt/opt_osr.c
b/ir/opt/opt_osr.c
index
7144e18
..
54e6921
100644
(file)
--- a/
ir/opt/opt_osr.c
+++ b/
ir/opt/opt_osr.c
@@
-28,9
+28,7
@@
* by Keith D. Cooper, L. Taylor Simpson, Christopher A. Vick.
* Extended version.
*/
* by Keith D. Cooper, L. Taylor Simpson, Christopher A. Vick.
* Extended version.
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
#include "config.h"
-#endif
#include "adt/pdeq.h"
#include "iroptimize.h"
#include "adt/pdeq.h"
#include "iroptimize.h"
@@
-52,7
+50,7
@@
#include "irloop_t.h"
#include "array.h"
#include "firmstat.h"
#include "irloop_t.h"
#include "array.h"
#include "firmstat.h"
-#include "
xmalloc
.h"
+#include "
error
.h"
/** The debug handle. */
DEBUG_ONLY(static firm_dbg_module_t *dbg;)
/** The debug handle. */
DEBUG_ONLY(static firm_dbg_module_t *dbg;)
@@
-305,7
+303,7
@@
static ir_node *do_apply(ir_opcode code, dbg_info *db, ir_node *op1, ir_node *op
result = new_rd_Sub(db, irg, block, op1, op2, mode);
break;
default:
result = new_rd_Sub(db, irg, block, op1, op2, mode);
break;
default:
-
assert(0
);
+
panic("Unsupported opcode"
);
result = NULL;
}
return result;
result = NULL;
}
return result;
@@
-939,7
+937,7
@@
static void dfs(ir_node *irn, iv_env *env)
for (i = 0; i < n; ++i) {
ir_node *pred = get_irn_n(irn, i);
for (i = 0; i < n; ++i) {
ir_node *pred = get_irn_n(irn, i);
- if (
irn_not
_visited(pred))
+ if (
!irn
_visited(pred))
dfs(pred, env);
}
}
dfs(pred, env);
}
}
@@
-951,7
+949,7
@@
static void dfs(ir_node *irn, iv_env *env)
push(env, irn);
/* handle the block */
push(env, irn);
/* handle the block */
- if (
irn_not
_visited(block))
+ if (
!irn
_visited(block))
dfs(block, env);
n = get_irn_arity(irn);
dfs(block, env);
n = get_irn_arity(irn);
@@
-959,7
+957,7
@@
static void dfs(ir_node *irn, iv_env *env)
ir_node *pred = get_irn_n(irn, i);
node_entry *o = get_irn_ne(pred, env);
ir_node *pred = get_irn_n(irn, i);
node_entry *o = get_irn_ne(pred, env);
- if (
irn_not
_visited(pred)) {
+ if (
!irn
_visited(pred)) {
dfs(pred, env);
node->low = MIN(node->low, o->low);
}
dfs(pred, env);
node->low = MIN(node->low, o->low);
}
@@
-997,7
+995,7
@@
static void do_dfs(ir_graph *irg, iv_env *env) {
ir_node *end = get_irg_end(irg);
int i, n;
ir_node *end = get_irg_end(irg);
int i, n;
-
set_using_irn_visited(irg
);
+
ir_reserve_resources(irg, IR_RESOURCE_IRN_VISITED
);
current_ir_graph = irg;
inc_irg_visited(irg);
current_ir_graph = irg;
inc_irg_visited(irg);
@@
-1010,11
+1008,11
@@
static void do_dfs(ir_graph *irg, iv_env *env) {
for (i = 0; i < n; ++i) {
ir_node *ka = get_End_keepalive(end, i);
for (i = 0; i < n; ++i) {
ir_node *ka = get_End_keepalive(end, i);
- if (
irn_not
_visited(ka))
+ if (
!irn
_visited(ka))
dfs(ka, env);
}
dfs(ka, env);
}
-
clear_using_irn_visited(irg
);
+
ir_free_resources(irg, IR_RESOURCE_IRN_VISITED
);
current_ir_graph = rem;
}
current_ir_graph = rem;
}
@@
-1112,12
+1110,12
@@
static ir_node *applyOneEdge(ir_node *iv, ir_node *rc, LFTR_edge *e, iv_env *env
DB((dbg, LEVEL_4, " + %+F", tv_r));
break;
case iro_Sub:
DB((dbg, LEVEL_4, " + %+F", tv_r));
break;
case iro_Sub:
- tv = tarval_sub(tv_l, tv_r);
- tv_init = tarval_sub(tv_init, tv_r);
+ tv = tarval_sub(tv_l, tv_r
, NULL
);
+ tv_init = tarval_sub(tv_init, tv_r
, NULL
);
DB((dbg, LEVEL_4, " - %+F", tv_r));
break;
default:
DB((dbg, LEVEL_4, " - %+F", tv_r));
break;
default:
-
assert(0
);
+
panic("Unsupported opcode"
);
tv = tarval_bad;
}
tv = tarval_bad;
}
@@
-1125,7
+1123,7
@@
static ir_node *applyOneEdge(ir_node *iv, ir_node *rc, LFTR_edge *e, iv_env *env
tv = tarval_add(tv, tv_incr);
} else {
assert(pscc->code == iro_Sub);
tv = tarval_add(tv, tv_incr);
} else {
assert(pscc->code == iro_Sub);
- tv = tarval_sub(tv, tv_incr);
+ tv = tarval_sub(tv, tv_incr
, NULL
);
}
tarval_set_integer_overflow_mode(ovmode);
}
tarval_set_integer_overflow_mode(ovmode);
@@
-1189,7
+1187,7
@@
static void do_lftr(ir_node *cmp, void *ctx) {
ir_node *iv, *rc;
ir_node *nleft = NULL, *nright = NULL;
ir_node *iv, *rc;
ir_node *nleft = NULL, *nright = NULL;
- if (
get_irn_op(cmp) != op_Cmp
)
+ if (
!is_Cmp(cmp)
)
return;
left = get_Cmp_left(cmp);
return;
left = get_Cmp_left(cmp);