Commit 198718a6 authored by Matthias Braun's avatar Matthias Braun
Browse files

no need for an explicit lower_mode_b pass, it should only be invoked by the backend

[r27990]
parent 74c0b452
......@@ -286,17 +286,6 @@ typedef struct lower_mode_b_config_t {
FIRM_API void ir_lower_mode_b(ir_graph *irg,
const lower_mode_b_config_t *config);
/**
* Creates an ir_graph pass for ir_lower_mode_b().
*
* @param name the name of this pass or NULL
* @param config configuration for mode_b lowerer
*
* @return the newly created ir_graph pass
*/
FIRM_API ir_graph_pass_t *ir_lower_mode_b_pass(const char *name,
const lower_mode_b_config_t *config);
/**
* Used as callback, whenever a lowerable mux is found. The return value
* indicates, whether the mux should be lowered. This may be used, to lower
......
......@@ -441,29 +441,3 @@ void ir_lower_mode_b(ir_graph *irg, const lower_mode_b_config_t *nconfig)
set_irg_outs_inconsistent(irg);
}
}
struct pass_t {
ir_graph_pass_t pass;
const lower_mode_b_config_t *config;
};
/**
* Wrapper to run ir_lower_mode_b() as an ir_graph pass
*/
static int pass_wrapper(ir_graph *irg, void *context)
{
struct pass_t *pass = context;
ir_lower_mode_b(irg, pass->config);
return 0;
}
ir_graph_pass_t *ir_lower_mode_b_pass(
const char *name, const lower_mode_b_config_t *config)
{
struct pass_t *pass = XMALLOCZ(struct pass_t);
pass->config = config;
return def_graph_pass_constructor(
&pass->pass, name ? name : "lower_mode_b", pass_wrapper);
}
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