projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use corresponding macro.
[libfirm]
/
ir
/
ir
/
irgwalk.c
diff --git
a/ir/ir/irgwalk.c
b/ir/ir/irgwalk.c
index
109f8ef
..
440dc61
100644
(file)
--- a/
ir/ir/irgwalk.c
+++ b/
ir/ir/irgwalk.c
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (C) 1995-20
08
University of Karlsruhe. All right reserved.
+ * Copyright (C) 1995-20
11
University of Karlsruhe. All right reserved.
*
* This file is part of libFirm.
*
*
* This file is part of libFirm.
*
@@
-190,7
+190,7
@@
void irg_walk_graph(ir_graph *irg, irg_walk_func *pre, irg_walk_func *post, void
current_ir_graph. */
void all_irg_walk(irg_walk_func *pre, irg_walk_func *post, void *env)
{
current_ir_graph. */
void all_irg_walk(irg_walk_func *pre, irg_walk_func *post, void *env)
{
-
in
t i, n;
+
size_
t i, n;
ir_graph *irg;
for (i = 0, n = get_irp_n_irgs(); i < n; i++) {
ir_graph *irg;
for (i = 0, n = get_irp_n_irgs(); i < n; i++) {
@@
-373,7
+373,7
@@
static void irg_block_walk_2(ir_node *node, irg_walk_func *pre,
}
}
-/* walks only over Block nodes in the graph. Has it
'
s own visited
+/* walks only over Block nodes in the graph. Has its own visited
flag, so that it can be interleaved with the other walker. */
void irg_block_walk(ir_node *node, irg_walk_func *pre, irg_walk_func *post, void *env)
{
flag, so that it can be interleaved with the other walker. */
void irg_block_walk(ir_node *node, irg_walk_func *pre, irg_walk_func *post, void *env)
{
@@
-478,7
+478,7
@@
static void walk_entity(ir_entity *ent, void *env)
if (ent->initializer != NULL) {
walk_initializer(ent->initializer, my_env);
} else if (entity_has_compound_ent_values(ent)) {
if (ent->initializer != NULL) {
walk_initializer(ent->initializer, my_env);
} else if (entity_has_compound_ent_values(ent)) {
-
in
t i, n_vals = get_compound_ent_n_values(ent);
+
size_
t i, n_vals = get_compound_ent_n_values(ent);
for (i = 0; i < n_vals; i++)
irg_walk(get_compound_ent_value(ent, i), my_env->pre, my_env->post, my_env->env);
for (i = 0; i < n_vals; i++)
irg_walk(get_compound_ent_value(ent, i), my_env->pre, my_env->post, my_env->env);
@@
-488,9
+488,10
@@
static void walk_entity(ir_entity *ent, void *env)
/* Walks over all code in const_code_irg. */
void walk_const_code(irg_walk_func *pre, irg_walk_func *post, void *env)
{
/* Walks over all code in const_code_irg. */
void walk_const_code(irg_walk_func *pre, irg_walk_func *post, void *env)
{
- int i, j, n_types;
walk_env my_env;
ir_segment_t s;
walk_env my_env;
ir_segment_t s;
+ size_t i;
+ size_t n_types;
ir_graph *rem = current_ir_graph;
current_ir_graph = get_const_code_irg();
ir_graph *rem = current_ir_graph;
current_ir_graph = get_const_code_irg();
@@
-501,7
+502,7
@@
void walk_const_code(irg_walk_func *pre, irg_walk_func *post, void *env)
my_env.env = env;
/* Walk all types that can contain constant entities. */
my_env.env = env;
/* Walk all types that can contain constant entities. */
- for (s = IR_SEGMENT_FIRST; s <= IR_SEGMENT_LAST;
s++
)
+ for (s = IR_SEGMENT_FIRST; s <= IR_SEGMENT_LAST;
++s
)
walk_types_entities(get_segment_type(s), &walk_entity, &my_env);
n_types = get_irp_n_types();
for (i = 0; i < n_types; i++)
walk_types_entities(get_segment_type(s), &walk_entity, &my_env);
n_types = get_irp_n_types();
for (i = 0; i < n_types; i++)
@@
-513,7
+514,7
@@
void walk_const_code(irg_walk_func *pre, irg_walk_func *post, void *env)
for (i = 0; i < n_types; i++) {
ir_type *tp = get_irp_type(i);
if (is_Array_type(tp)) {
for (i = 0; i < n_types; i++) {
ir_type *tp = get_irp_type(i);
if (is_Array_type(tp)) {
-
int
n_dim = get_array_n_dimensions(tp);
+
size_t j,
n_dim = get_array_n_dimensions(tp);
for (j = 0; j < n_dim; j++) {
ir_node *n = get_array_lower_bound(tp, j);
if (n) irg_walk(n, pre, post, env);
for (j = 0; j < n_dim; j++) {
ir_node *n = get_array_lower_bound(tp, j);
if (n) irg_walk(n, pre, post, env);