Commit 9771520f authored by Matthias Braun's avatar Matthias Braun
Browse files

allow_ifconv callback may not be NULL anymore

[r28033]
parent 3fb6a09d
......@@ -359,6 +359,15 @@ static void TEMPLATE_lower_for_target(void)
{
}
static int TEMPLATE_is_mux_allowed(ir_node *sel, ir_node *mux_false,
ir_node *mux_true)
{
(void) sel;
(void) mux_false;
(void) mux_true;
return false;
}
/**
* Returns the libFirm configuration parameter for this backend.
*/
......@@ -370,7 +379,7 @@ static const backend_params *TEMPLATE_get_backend_params(void)
0, /* 0: little-endian, 1: big-endian */
TEMPLATE_lower_for_target, /* lowering for target */
NULL, /* architecture dependent settings, will be set later */
NULL, /* parameter for if conversion */
TEMPLATE_is_mux_allowed, /* parameter for if conversion */
NULL, /* float arithmetic mode */
0, /* no trampoline support: size 0 */
0, /* no trampoline support: align 0 */
......
......@@ -518,6 +518,15 @@ static void amd64_lower_for_target(void)
{
}
static int amd64_is_mux_allowed(ir_node *sel, ir_node *mux_false,
ir_node *mux_true)
{
(void) sel;
(void) mux_false;
(void) mux_true;
return false;
}
/**
* Returns the libFirm configuration parameter for this backend.
*/
......@@ -528,7 +537,7 @@ static const backend_params *amd64_get_backend_params(void) {
0, /* little endian */
amd64_lower_for_target, /* lowering callback */
NULL, /* will be set later */
NULL, /* parameter for if conversion */
amd64_is_mux_allowed, /* parameter for if conversion */
NULL, /* float arithmetic mode */
0, /* no trampoline support: size 0 */
0, /* no trampoline support: align 0 */
......
......@@ -543,8 +543,7 @@ static int arm_is_mux_allowed(ir_node *sel, ir_node *mux_false,
(void) sel;
(void) mux_false;
(void) mux_true;
return 0;
return false;
}
static asm_constraint_flags_t arm_parse_asm_constraint(const char **c)
......
......@@ -553,6 +553,15 @@ static void sparc_lower_for_target(void)
}
}
static int sparc_is_mux_allowed(ir_node *sel, ir_node *mux_false,
ir_node *mux_true)
{
(void) sel;
(void) mux_false;
(void) mux_true;
return false;
}
/**
* Returns the libFirm configuration parameter for this backend.
*/
......@@ -573,7 +582,7 @@ static const backend_params *sparc_get_backend_params(void)
1, /* big endian */
sparc_lower_for_target, /* lowering callback */
&arch_dep, /* will be set later */
NULL, /* parameter for if conversion */
sparc_is_mux_allowed, /* parameter for if conversion */
NULL, /* float arithmetic mode */
0, /* no trampoline support: size 0 */
0, /* no trampoline support: align 0 */
......
......@@ -54,18 +54,6 @@ typedef struct walker_env {
DEBUG_ONLY(static firm_dbg_module_t *dbg);
/**
* Default callback for Mux creation: don't allow any Mux nodes
*/
static int default_allow_ifconv(ir_node *sel, ir_node *mux_false,
ir_node *mux_true)
{
(void) sel;
(void) mux_false;
(void) mux_true;
return 0;
}
/**
* Returns non-zero if a Block can be emptied.
*
......@@ -482,11 +470,8 @@ void opt_if_conv(ir_graph *irg)
const backend_params *be_params = be_get_backend_param();
/* get the parameters */
if (be_params->allow_ifconv != NULL)
env.allow_ifconv = be_params->allow_ifconv;
else
env.allow_ifconv = default_allow_ifconv;
env.changed = false;
env.allow_ifconv = be_params->allow_ifconv;
env.changed = false;
FIRM_DBG_REGISTER(dbg, "firm.opt.ifconv");
......
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