-static perm_cycle_t *get_perm_cycle(perm_cycle_t *const cycle,
- reg_pair_t *const pairs,
- int const n,
- int start)
+static void get_perm_cycle(perm_cycle_t *const cycle,
+ reg_pair_t *const pairs,
+ int const n,
+ int start)
}
static void gen_assure_different_pattern(ir_node *irn, ir_node *other_different, constraint_env_t *env) {
}
static void gen_assure_different_pattern(ir_node *irn, ir_node *other_different, constraint_env_t *env) {
- be_irg_t *birg = env->birg;
- ir_graph *irg = be_get_birg_irg(birg);
- ir_nodemap_t *op_set = &env->op_set;
- ir_node *block = get_nodes_block(irn);
- const arch_register_class_t *cls = arch_get_irn_reg_class(other_different, -1);
- ir_node *in[2], *keep, *cpy;
+ ir_graph *irg;
+ ir_nodemap_t *op_set;
+ ir_node *block;
+ const arch_register_class_t *cls;
+ ir_node *keep, *cpy;
/* Make a not spillable copy of the different node */
/* this is needed because the different irn could be */
/* in block far far away */
/* The copy is optimized later if not needed */
/* check if already exists such a copy in the schedule immediately before */
/* Make a not spillable copy of the different node */
/* this is needed because the different irn could be */
/* in block far far away */
/* The copy is optimized later if not needed */
/* check if already exists such a copy in the schedule immediately before */
if (! cpy) {
cpy = be_new_Copy(cls, irg, block, other_different);
be_node_set_flags(cpy, BE_OUT_POS(0), arch_irn_flags_dont_spill);
DBG((dbg_constr, LEVEL_1, "created non-spillable %+F for value %+F\n", cpy, other_different));
if (! cpy) {
cpy = be_new_Copy(cls, irg, block, other_different);
be_node_set_flags(cpy, BE_OUT_POS(0), arch_irn_flags_dont_spill);
DBG((dbg_constr, LEVEL_1, "created non-spillable %+F for value %+F\n", cpy, other_different));
DBG((dbg_constr, LEVEL_1, "using already existing %+F for value %+F\n", cpy, other_different));
}
DBG((dbg_constr, LEVEL_1, "using already existing %+F for value %+F\n", cpy, other_different));
}
/* Add the Keep resp. CopyKeep and reroute the users */
/* of the other_different irn in case of CopyKeep. */
if (has_irn_users(other_different)) {
keep = be_new_CopyKeep_single(cls, irg, block, cpy, irn, get_irn_mode(other_different));
be_node_set_reg_class(keep, 1, cls);
/* Add the Keep resp. CopyKeep and reroute the users */
/* of the other_different irn in case of CopyKeep. */
if (has_irn_users(other_different)) {
keep = be_new_CopyKeep_single(cls, irg, block, cpy, irn, get_irn_mode(other_different));
be_node_set_reg_class(keep, 1, cls);
keep = be_new_Keep(cls, irg, block, 2, in);
}
keep = be_new_Keep(cls, irg, block, 2, in);
}
/* insert copy and keep into schedule */
assert(sched_is_scheduled(irn) && "need schedule to assure constraints");
if (! sched_is_scheduled(cpy))
/* insert copy and keep into schedule */
assert(sched_is_scheduled(irn) && "need schedule to assure constraints");
if (! sched_is_scheduled(cpy))
sched_add_after(irn, keep);
/* insert the other different and it's copies into the map */
sched_add_after(irn, keep);
/* insert the other different and it's copies into the map */
ir_nodeset_insert(&entry->copies, cpy);
/* insert keep in case of CopyKeep */
ir_nodeset_insert(&entry->copies, cpy);
/* insert keep in case of CopyKeep */