summaryrefslogtreecommitdiffhomepage
path: root/ir/be/becopyilp2.c
diff options
context:
space:
mode:
authorMatthias Braun <matthias.braun@kit.edu>2012-07-10 15:52:01 +0200
committerMatthias Braun <matthias.braun@kit.edu>2012-07-10 15:52:01 +0200
commit31d36dd3e8a2b7b513958f005cc555e01b9c3d5b (patch)
tree416d7cfcacd3233e54eb18aa0e87c6f65c34b17b /ir/be/becopyilp2.c
parente147f751c8a77f40096fa59cba555669e9af688b (diff)
make code C++ warning clean (again)
Diffstat (limited to 'ir/be/becopyilp2.c')
-rw-r--r--ir/be/becopyilp2.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/ir/be/becopyilp2.c b/ir/be/becopyilp2.c
index 49f89b4..17b9262 100644
--- a/ir/be/becopyilp2.c
+++ b/ir/be/becopyilp2.c
@@ -84,7 +84,7 @@ static void make_color_var_name(char *buf, size_t buf_size,
static void build_coloring_cstr(ilp_env_t *ienv)
{
- local_env_t *lenv = ienv->env;
+ local_env_t *lenv = (local_env_t*)ienv->env;
be_ifg_t *ifg = ienv->co->cenv->ifg;
unsigned n_regs = arch_register_class_n_regs(ienv->co->cls);
const unsigned *allocatable_colors = lenv->allocatable_colors;
@@ -162,7 +162,7 @@ static void build_coloring_cstr(ilp_env_t *ienv)
static void build_interference_cstr(ilp_env_t *ienv)
{
lpp_t *lpp = ienv->lp;
- local_env_t *lenv = ienv->env;
+ local_env_t *lenv = (local_env_t*)ienv->env;
be_ifg_t *ifg = ienv->co->cenv->ifg;
unsigned n_colors = arch_register_class_n_regs(ienv->co->cls);
ir_node **clique = ALLOCAN(ir_node*, n_colors);
@@ -291,8 +291,8 @@ typedef struct edge_t {
static int compare_edge_t(const void *k1, const void *k2, size_t size)
{
- const edge_t *e1 = k1;
- const edge_t *e2 = k2;
+ const edge_t *e1 = (const edge_t*)k1;
+ const edge_t *e2 = (const edge_t*)k2;
(void) size;
return ! (e1->n1 == e2->n1 && e1->n2 == e2->n2);
@@ -312,7 +312,7 @@ static inline edge_t *add_edge(set *edges, ir_node *n1, ir_node *n2, size_t *cou
new_edge.n2 = n1;
}
(*counter)++;
- return set_insert(edges, &new_edge, sizeof(new_edge), HASH_EDGE(&new_edge));
+ return (edge_t*)set_insert(edges, &new_edge, sizeof(new_edge), HASH_EDGE(&new_edge));
}
static inline edge_t *find_edge(set *edges, ir_node *n1, ir_node *n2)
@@ -326,7 +326,7 @@ static inline edge_t *find_edge(set *edges, ir_node *n1, ir_node *n2)
new_edge.n1 = n2;
new_edge.n2 = n1;
}
- return set_find(edges, &new_edge, sizeof(new_edge), HASH_EDGE(&new_edge));
+ return (edge_t*)set_find(edges, &new_edge, sizeof(new_edge), HASH_EDGE(&new_edge));
}
static inline void remove_edge(set *edges, ir_node *n1, ir_node *n2, size_t *counter)
@@ -340,7 +340,7 @@ static inline void remove_edge(set *edges, ir_node *n1, ir_node *n2, size_t *cou
new_edge.n1 = n2;
new_edge.n2 = n1;
}
- e = set_find(edges, &new_edge, sizeof(new_edge), HASH_EDGE(&new_edge));
+ e = (edge_t*)set_find(edges, &new_edge, sizeof(new_edge), HASH_EDGE(&new_edge));
if (e) {
e->n1 = NULL;
e->n2 = NULL;
@@ -348,7 +348,7 @@ static inline void remove_edge(set *edges, ir_node *n1, ir_node *n2, size_t *cou
}
}
-#define pset_foreach(pset, irn) for (irn=pset_first(pset); irn; irn=pset_next(pset))
+#define pset_foreach(pset, irn) for (irn=(ir_node*)pset_first(pset); irn; irn=(ir_node*)pset_next(pset))
/**
* Search for an interference clique and an external node
@@ -383,7 +383,7 @@ static void build_clique_star_cstr(ilp_env_t *ienv)
++n_nodes;
}
}
- nodes = obstack_finish(&ob);
+ nodes = (ir_node**)obstack_finish(&ob);
/* get all interference edges between these */
n_edges = 0;
@@ -401,7 +401,7 @@ static void build_clique_star_cstr(ilp_env_t *ienv)
bool growed;
/* get 2 starting nodes to form a clique */
- for (e=set_first(edges); !e->n1; e=set_next(edges)) {
+ for (e=(edge_t*)set_first(edges); !e->n1; e=(edge_t*)set_next(edges)) {
}
/* we could be stepped out of the loop before the set iterated to the end */
@@ -570,7 +570,7 @@ static void ilp2_build(ilp_env_t *ienv)
static void ilp2_apply(ilp_env_t *ienv)
{
- local_env_t *lenv = ienv->env;
+ local_env_t *lenv = (local_env_t*)ienv->env;
ir_graph *irg = ienv->co->irg;
/* first check if there was sth. to optimize */