Commit 0b05f1e5 authored by Christoph Mallon's avatar Christoph Mallon
Browse files

Remove unused vars

parent c7dc4e00
......@@ -797,7 +797,6 @@ static int check_dependence(ir_node *curr, ir_node *tgt, ir_node *bl)
static int dependent_on(ir_node *n1, ir_node *n2)
{
ir_node *bl = get_nodes_block(n1);
ir_graph *irg = get_irn_irg(bl);
assert(bl == get_nodes_block(n2));
......@@ -1269,7 +1268,6 @@ static ir_node *create_be_return(be_abi_irg_t *env, ir_node *irn, ir_node *bl, i
/* clear SP entry, since it has already been grown. */
pmap_insert(reg_map, (void *) isa->sp, NULL);
for(i = 0; i < n_res; ++i) {
ir_node *res = get_Return_res(irn, i);
be_abi_call_arg_t *arg = get_call_arg(call, 1, i);
in[n] = be_abi_reg_map_get(reg_map, arg->reg);
......
......@@ -184,7 +184,6 @@ static void tikz_begin(plotter_t *_self, const rect_t *vis)
static void tikz_setcolor(plotter_t *_self, const color_t *color)
{
decl_self(tikz_plotter_t, _self);
set_color(_self, color);
}
......
......@@ -403,7 +403,6 @@ static int recolor(co2_t *env, ir_node *irn, col_cost_pair_t *col_list, struct l
be_ifg_t *ifg = env->co->cenv->ifg;
co2_irn_t *ci = get_co2_irn(env, irn);
int res = 0;
int n_aff = 0;
int i;
......@@ -703,7 +702,6 @@ static int coalesce_top_down(co2_cloud_irn_t *ci, int child_nr, int depth)
INIT_LIST_HEAD(&changed);
for(i = 0; i < (best_col < 0 ? n_regs : n_iter); ++i) {
col_t col = seq[i].col;
int costs = seq[i].costs;
int add_cost = !is_root && col != parent_col ? ci->mst_costs : 0;
int subtree_costs, sum_costs;
......@@ -867,7 +865,6 @@ static void process_cloud(co2_cloud_t *cloud)
int *mst_edges = xmalloc(cloud->n_memb * cloud->n_memb * sizeof(mst_edges[0]));
pdeq *q;
struct list_head changed;
edge_t *edges;
int i;
int best_col;
......@@ -1240,7 +1237,8 @@ void co_solve_heuristic_new(copy_opt_t *co)
if(dump_flags & DUMP_BEFORE) {
ir_snprintf(buf, sizeof(buf), "ifg_%F_%s_before.dot", co->irg, co->cls->name);
if(f = fopen(buf, "wt")) {
f = fopen(buf, "wt");
if (f != NULL) {
be_ifg_dump_dot(co->cenv->ifg, co->irg, f, &ifg_dot_cb, &env);
fclose(f);
}
......@@ -1250,7 +1248,8 @@ void co_solve_heuristic_new(copy_opt_t *co)
if(dump_flags & DUMP_AFTER) {
ir_snprintf(buf, sizeof(buf), "ifg_%F_%s_after.dot", co->irg, co->cls->name);
if(f = fopen(buf, "wt")) {
f = fopen(buf, "wt");
if (f != NULL) {
be_ifg_dump_dot(co->cenv->ifg, co->irg, f, &ifg_dot_cb, &env);
fclose(f);
}
......
......@@ -69,7 +69,6 @@ static INLINE int sr_is_simplicial(size_red_t *sr, const ir_node *ifn) {
void sr_remove(size_red_t *sr) {
ir_node *irn;
int redo = 1;
int n_nodes = 0;
const be_ifg_t *ifg = sr->co->cenv->ifg;
void *iter = be_ifg_nodes_iter_alloca(ifg);
......
......@@ -282,7 +282,6 @@ void be_ifg_check_sorted(const be_ifg_t *ifg)
ir_node *n, *m;
const int node_count = be_ifg_check_get_node_count(ifg);
int neighbours_count = 0;
int i = 0;
ir_node **all_nodes = xmalloc(node_count * sizeof(all_nodes[0]));
......@@ -341,7 +340,6 @@ void be_ifg_check_sorted_to_file(const be_ifg_t *ifg, FILE *f)
ir_node *n, *m;
const int node_count = be_ifg_check_get_node_count(ifg);
int neighbours_count = 0;
int i = 0;
ir_node **all_nodes = xmalloc(node_count * sizeof(all_nodes[0]));
......
......@@ -383,7 +383,6 @@ static void find_first_neighbour(const ifg_clique_t *ifg, cli_iter_t *it, const
static ir_node *get_next_neighbour(cli_iter_t *it)
{
ir_node *res = NULL;
cli_head_t *cli_head = it->curr_cli_head;
const ir_node *irn = it->curr_irn;
if (it->curr_cli_element != NULL)
......
......@@ -55,7 +55,7 @@ typedef struct _mris_irn_t {
#define get_mris_irn(env, irn) ((mris_irn_t *) phase_get_or_set_irn_data(&env->ph, irn))
#define foreach_lineage(env, pos, tmp) list_for_each_entry_safe(mris_irn_t, pos, tmp, &(env)->lineage_head, lineage_list)
static void *mris_irn_data_init(phase_t *ph, const ir_node *irn, void *data)
static void *mris_irn_data_init(phase_t *ph, ir_node *irn, void *data)
{
mris_irn_t *mi = data ? data : phase_alloc(ph, sizeof(mi[0]));
memset(mi, 0, sizeof(mi[0]));
......@@ -430,7 +430,6 @@ static int fuse_two_lineages(mris_env_t *env, mris_irn_t *u, mris_irn_t *v)
static void fuse_lineages(mris_env_t *env)
{
int fused = 1;
mris_irn_t *u, *v, *tmp1, *tmp2;
again:
......
......@@ -327,7 +327,6 @@ static const arch_register_t *ia32_abi_prologue(void *self, ir_node **mem, pmap
ia32_abi_env_t *env = self;
if (!env->flags.try_omit_fp) {
int reg_size = get_mode_size_bytes(env->isa->bp->reg_class->mode);
ir_node *bl = get_irg_start_block(env->irg);
ir_node *curr_sp = be_abi_reg_map_get(reg_map, env->isa->sp);
ir_node *curr_bp = be_abi_reg_map_get(reg_map, env->isa->bp);
......@@ -386,7 +385,6 @@ static void ia32_abi_epilogue(void *self, ir_node *bl, ir_node **mem, pmap *reg_
else {
const ia32_isa_t *isa = (ia32_isa_t *)env->isa;
ir_mode *mode_bp = env->isa->bp->reg_class->mode;
int reg_size = get_mode_size_bytes(env->isa->bp->reg_class->mode);
/* gcc always emits a leave at the end of a routine */
if (1 || ARCH_AMD(isa->opt_arch)) {
......@@ -1300,7 +1298,6 @@ static int ia32_get_n_reg_class(const void *self) {
* Return the register class for index i.
*/
static const arch_register_class_t *ia32_get_reg_class(const void *self, int i) {
const ia32_isa_t *isa = self;
assert(i >= 0 && i < 3 && "Invalid ia32 register class requested.");
if (i == 0)
return &ia32_reg_classes[CLASS_ia32_gp];
......
......@@ -751,7 +751,6 @@ static unsigned vfp_liveness_end_of_block(x87_simulator *sim, const ir_node *bl)
static unsigned vfp_liveness_nodes_live_at(x87_simulator *sim, const ir_node *pos)
{
const ir_node *bl = is_Block(pos) ? pos : get_nodes_block(pos);
const arch_register_class_t *cls = &ia32_reg_classes[CLASS_ia32_vfp];
ir_node *irn;
unsigned live;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment