Commit 58d31ad8 authored by Matthias Braun's avatar Matthias Braun
Browse files

change global optdesc declarations to static

some were missing anyway and nobody is using the global declarations anyway
parent 3bb47464
......@@ -745,7 +745,7 @@ static ir_graph_state_t do_simplify_bool(ir_graph *const irg)
return res;
}
optdesc_t opt_simplify_bool = {
static optdesc_t opt_simplify_bool = {
"bool-simplification",
IR_GRAPH_STATE_ONE_RETURN, /* works better with one return block only */
do_simplify_bool,
......
......@@ -970,7 +970,7 @@ static ir_graph_state_t do_cfopt(ir_graph *irg)
return 0;
}
optdesc_t opt_cf = {
static optdesc_t opt_cf = {
"control-flow",
IR_GRAPH_STATE_NO_UNREACHABLE_CODE,
do_cfopt,
......
......@@ -423,7 +423,7 @@ static ir_graph_state_t do_codeplacement(ir_graph *irg)
return 0;
}
optdesc_t opt_codeplacement = {
static optdesc_t opt_codeplacement = {
"code-placement",
IR_GRAPH_STATE_NO_CRITICAL_EDGES |
IR_GRAPH_STATE_CONSISTENT_OUTS |
......@@ -448,6 +448,7 @@ static void place_code_wrapper(ir_graph *irg)
set_opt_global_cse(0);
}
#if 0
static ir_graph_state_t do_gcse(ir_graph *irg)
{
set_opt_global_cse(1);
......@@ -457,7 +458,7 @@ static ir_graph_state_t do_gcse(ir_graph *irg)
return 0;
}
optdesc_t opt_gcse = {
static optdesc_t opt_gcse = {
"gcse",
IR_GRAPH_STATE_NO_CRITICAL_EDGES |
IR_GRAPH_STATE_CONSISTENT_OUTS |
......@@ -465,6 +466,7 @@ optdesc_t opt_gcse = {
IR_GRAPH_STATE_CONSISTENT_LOOPINFO,
do_gcse,
};
#endif
ir_graph_pass_t *place_code_pass(const char *name)
{
......
......@@ -3605,7 +3605,7 @@ static ir_graph_state_t do_combo(ir_graph *irg)
return 0; // cannot guarantee anything
} /* combo */
optdesc_t opt_combo = {
static optdesc_t opt_combo = {
"combo",
IR_GRAPH_STATE_NO_BADS | IR_GRAPH_STATE_CONSISTENT_OUTS | IR_GRAPH_STATE_CONSISTENT_LOOPINFO,
do_combo,
......
......@@ -329,7 +329,7 @@ static ir_graph_state_t do_deconv(ir_graph *irg)
return 0;
}
optdesc_t opt_deconv = {
static optdesc_t opt_deconv = {
"deconv",
IR_GRAPH_STATE_CONSISTENT_OUT_EDGES,
do_deconv,
......
......@@ -866,7 +866,7 @@ static ir_graph_state_t do_fixpoint_vrp(ir_graph* const irg)
return res;
}
optdesc_t opt_fpvrp = {
static optdesc_t opt_fpvrp = {
"fp-vrp",
IR_GRAPH_STATE_NO_BADS | IR_GRAPH_STATE_NO_UNREACHABLE_CODE | IR_GRAPH_STATE_CONSISTENT_DOMINANCE | IR_GRAPH_STATE_CONSISTENT_OUT_EDGES,
do_fixpoint_vrp,
......
......@@ -497,7 +497,7 @@ static ir_graph_state_t do_ifconv(ir_graph *irg)
return IR_GRAPH_STATE_NO_CRITICAL_EDGES | IR_GRAPH_STATE_ONE_RETURN;
}
optdesc_t opt_ifconv = {
static optdesc_t opt_ifconv = {
"if-conversion",
IR_GRAPH_STATE_NO_CRITICAL_EDGES | IR_GRAPH_STATE_NO_UNREACHABLE_CODE | IR_GRAPH_STATE_NO_BADS | IR_GRAPH_STATE_ONE_RETURN,
do_ifconv,
......
......@@ -781,7 +781,7 @@ static ir_graph_state_t do_jumpthread(ir_graph* irg)
return res;
}
optdesc_t opt_jumpthread = {
static optdesc_t opt_jumpthread = {
"jumpthreading",
IR_GRAPH_STATE_NO_UNREACHABLE_CODE | IR_GRAPH_STATE_CONSISTENT_OUT_EDGES | IR_GRAPH_STATE_NO_CRITICAL_EDGES,
do_jumpthread,
......
......@@ -2302,7 +2302,7 @@ static ir_graph_state_t do_loadstore_opt(ir_graph *irg)
return res;
}
optdesc_t opt_loadstore = {
static optdesc_t opt_loadstore = {
"load-store",
IR_GRAPH_STATE_NO_UNREACHABLE_CODE | IR_GRAPH_STATE_CONSISTENT_OUT_EDGES | IR_GRAPH_STATE_NO_CRITICAL_EDGES | IR_GRAPH_STATE_CONSISTENT_DOMINANCE | IR_GRAPH_STATE_CONSISTENT_ENTITY_USAGE,
do_loadstore_opt,
......
......@@ -2738,19 +2738,19 @@ static ir_graph_state_t perform_loop_peeling(ir_graph *irg)
return 0;
}
optdesc_t opt_unroll_loops = {
static optdesc_t opt_unroll_loops = {
"unroll-loops",
IR_GRAPH_STATE_CONSISTENT_OUT_EDGES | IR_GRAPH_STATE_CONSISTENT_OUTS | IR_GRAPH_STATE_CONSISTENT_LOOPINFO,
perform_loop_unrolling,
};
optdesc_t opt_invert_loops = {
static optdesc_t opt_invert_loops = {
"invert-loops",
IR_GRAPH_STATE_CONSISTENT_OUT_EDGES | IR_GRAPH_STATE_CONSISTENT_OUTS | IR_GRAPH_STATE_CONSISTENT_LOOPINFO,
perform_loop_inversion,
};
optdesc_t opt_peel_loops = {
static optdesc_t opt_peel_loops = {
"peel-loops",
IR_GRAPH_STATE_CONSISTENT_OUT_EDGES | IR_GRAPH_STATE_CONSISTENT_OUTS | IR_GRAPH_STATE_CONSISTENT_LOOPINFO,
perform_loop_peeling,
......
......@@ -59,22 +59,4 @@ typedef struct optdesc_t {
*/
void perform_irg_optimization(ir_graph *irg, optdesc_t *opt);
/** A list of all optimization descriptions
* TODO We could put something like this into the API
*/
extern optdesc_t opt_ifconv;
extern optdesc_t opt_fpvrp;
extern optdesc_t opt_cf;
extern optdesc_t opt_deconv;
extern optdesc_t opt_simplify_bool;
extern optdesc_t opt_code_placement;
extern optdesc_t opt_combo;
extern optdesc_t opt_loadstore;
extern optdesc_t opt_peel_loops;
extern optdesc_t opt_unroll_loops;
extern optdesc_t opt_invert_loops;
extern optdesc_t opt_gcse;
extern optdesc_t opt_parallel_mem;
extern optdesc_t opt_jumpthread;
#endif /* FIRM_OPT_MANAGE_H */
#endif
......@@ -246,7 +246,7 @@ static ir_graph_state_t do_parallelize_mem(ir_graph *irg)
return 0;
}
optdesc_t opt_parallel_mem = {
static optdesc_t opt_parallel_mem = {
"parallel-mem",
0,
do_parallelize_mem,
......
......@@ -769,7 +769,7 @@ static ir_graph_state_t do_scalar_replacement(ir_graph *irg)
return 0;
}
optdesc_t opt_scalar_rep = {
static optdesc_t opt_scalar_rep = {
"scalar-replace",
IR_GRAPH_STATE_NO_UNREACHABLE_CODE | IR_GRAPH_STATE_CONSISTENT_OUTS,
do_scalar_replacement,
......
Markdown is supported
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