projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
also do unreachable code elimination during gcse
[libfirm]
/
ir
/
lower
/
lower_intrinsics.c
diff --git
a/ir/lower/lower_intrinsics.c
b/ir/lower/lower_intrinsics.c
index
6482071
..
bab53c6
100644
(file)
--- a/
ir/lower/lower_intrinsics.c
+++ b/
ir/lower/lower_intrinsics.c
@@
-476,7
+476,8
@@
static int i_mapper_one_to_zero(ir_node *call, void *ctx, int reason)
*/
static int i_mapper_symmetric_zero_to_one(ir_node *call, void *ctx, int reason)
{
*/
static int i_mapper_symmetric_zero_to_one(ir_node *call, void *ctx, int reason)
{
- ir_node *val = get_Call_param(call, 0);
+ int changed = 0;
+ ir_node *val = get_Call_param(call, 0);
(void) ctx;
if (is_strictConv(val)) {
(void) ctx;
if (is_strictConv(val)) {
@@
-495,12
+496,14
@@
static int i_mapper_symmetric_zero_to_one(ir_node *call, void *ctx, int reason)
}
DBG_OPT_ALGSIM2(call, op, call, FS_OPT_RTS_SYMMETRIC);
set_Call_param(call, 0, val);
}
DBG_OPT_ALGSIM2(call, op, call, FS_OPT_RTS_SYMMETRIC);
set_Call_param(call, 0, val);
+ changed = 1;
}
} else if (is_Minus(val)) {
/* f(-x) = f(x) */
val = get_Minus_op(val);
DBG_OPT_ALGSIM2(call, val, call, FS_OPT_RTS_SYMMETRIC);
set_Call_param(call, 0, val);
}
} else if (is_Minus(val)) {
/* f(-x) = f(x) */
val = get_Minus_op(val);
DBG_OPT_ALGSIM2(call, val, call, FS_OPT_RTS_SYMMETRIC);
set_Call_param(call, 0, val);
+ changed = 1;
}
if (is_Const(val) && is_Const_null(val)) {
}
if (is_Const(val) && is_Const_null(val)) {
@@
-511,9
+514,9
@@
static int i_mapper_symmetric_zero_to_one(ir_node *call, void *ctx, int reason)
ir_node *mem = get_Call_mem(call);
DBG_OPT_ALGSIM0(call, irn, reason);
replace_call(irn, call, mem, NULL, NULL);
ir_node *mem = get_Call_mem(call);
DBG_OPT_ALGSIM0(call, irn, reason);
replace_call(irn, call, mem, NULL, NULL);
-
return
1;
+
changed =
1;
}
}
- return
0
;
+ return
changed
;
} /* i_mapper_symmetric_zero_to_one */
/* A mapper for the floating point log. */
} /* i_mapper_symmetric_zero_to_one */
/* A mapper for the floating point log. */
@@
-640,8
+643,8
@@
static ir_node *eval_strlen(ir_graph *irg, ir_entity *ent, ir_type *res_tp)
ir_type *tp = get_entity_type(ent);
ir_mode *mode;
ir_initializer_t *initializer;
ir_type *tp = get_entity_type(ent);
ir_mode *mode;
ir_initializer_t *initializer;
-
unsigned
size;
-
unsigned
i;
+
size_t
size;
+
size_t
i;
if (! is_Array_type(tp))
return NULL;
if (! is_Array_type(tp))
return NULL;