if(!pset_find_ptr(copy_blocks, y))
pdeq_putr(worklist, y);
-
}
}
}
DBG((dbg, LEVEL_1, "Searching valid def for use %+F at pos %d\n", usage, pos));
/*
- * If the usage is in a phi node, search the copy in the
- * predecessor denoted by pos.
- */
+ * If the usage is in a phi node, search the copy in the
+ * predecessor denoted by pos.
+ */
if(is_Phi(usage)) {
curr_bl = get_Block_cfgpred_block(curr_bl, pos);
start_irn = sched_last(curr_bl);
return NULL;
}
-static void fix_usages(pset *copies, pset *copy_blocks, pset *phi_blocks, pset *phis, pset *ignore_uses, pset *uses)
+static void fix_usages(pset *copies, pset *copy_blocks, pset *phi_blocks, pset *phis, pset *ignore_uses)
{
int n_outs = 0;
struct obstack obst;
for (irn = pset_first(copies); irn; irn = pset_next(copies)) {
const ir_edge_t *edge;
foreach_out_edge(irn, edge) {
- if(!uses || pset_find_ptr(uses, get_edge_src_irn(edge))) {
- if (!pset_find_ptr(ignore_uses, get_edge_src_irn(edge)) ) {
- struct out tmp;
- tmp.irn = get_edge_src_irn(edge);
- tmp.pos = get_edge_src_pos(edge);
- obstack_grow(&obst, &tmp, sizeof(tmp));
- n_outs++;
- }
+ if (!pset_find_ptr(ignore_uses, get_edge_src_irn(edge))) {
+ struct out tmp;
+ tmp.irn = get_edge_src_irn(edge);
+ tmp.pos = get_edge_src_pos(edge);
+ obstack_grow(&obst, &tmp, sizeof(tmp));
+ n_outs++;
}
}
}
}
}
-void be_ssa_constr_phis_ignore(dom_front_info_t *info, int n, ir_node *nodes[], pset *phis, pset *ignore_uses, pset *uses)
+void be_ssa_constr_phis_ignore(dom_front_info_t *info, int n, ir_node *nodes[], pset *phis, pset *ignore_uses)
{
pset *irns = pset_new_ptr(n);
int i;
for(i = 0; i < n; ++i)
pset_insert_ptr(irns, nodes[i]);
- be_ssa_constr_set_phis_ignore(info, irns, phis, ignore_uses, uses);
+ be_ssa_constr_set_phis_ignore(info, irns, phis, ignore_uses);
del_pset(irns);
}
void be_ssa_constr_ignore(dom_front_info_t *info, int n, ir_node *nodes[], pset *ignore_uses)
{
- be_ssa_constr_phis_ignore(info, n, nodes, NULL, ignore_uses, NULL);
+ be_ssa_constr_phis_ignore(info, n, nodes, NULL, ignore_uses);
}
void be_ssa_constr(dom_front_info_t *info, int n, ir_node *nodes[])
be_ssa_constr_ignore(info, n, nodes, empty_set);
}
-void be_ssa_constr_set_phis_ignore(dom_front_info_t *df, pset *nodes, pset *phis, pset *ignore_uses, pset *uses)
+void be_ssa_constr_set_phis_ignore(dom_front_info_t *df, pset *nodes, pset *phis, pset *ignore_uses)
{
int n = pset_count(nodes);
pset *blocks = pset_new_ptr(n);
* Place the phi functions and reroute the usages.
*/
determine_phi_blocks(nodes, blocks, phi_blocks, df);
- fix_usages(nodes, blocks, phi_blocks, phis, ignore_uses, uses);
+ fix_usages(nodes, blocks, phi_blocks, phis, ignore_uses);
/* reset the optimizations */
set_optimize(save_optimize);
void be_ssa_constr_set_phis(dom_front_info_t *df, pset *nodes, pset *phis)
{
pset *empty_set = be_empty_set();
- be_ssa_constr_set_phis_ignore(df, nodes, phis, empty_set, NULL);
+ be_ssa_constr_set_phis_ignore(df, nodes, phis, empty_set);
}
void be_ssa_constr_set_ignore(dom_front_info_t *df, pset *nodes, pset *ignore_uses)
{
- be_ssa_constr_set_phis_ignore(df, nodes, NULL, ignore_uses, NULL);
+ be_ssa_constr_set_phis_ignore(df, nodes, NULL, ignore_uses);
}
void be_ssa_constr_set(dom_front_info_t *info, pset *nodes)
be_ssa_constr_set_ignore(info, nodes, empty_set);
}
-void be_ssa_constr_set_uses(dom_front_info_t *info, pset *nodes, pset *uses)
-{
- pset *empty_set = be_empty_set();
- be_ssa_constr_set_phis_ignore(info, nodes, NULL, empty_set, uses);
-}
-
/*
___ _ ____
|_ _|_ __ ___ ___ _ __| |_ | _ \ ___ _ __ _ __ ___
DBG((dbg, LEVEL_1, "Insert Perm after: %+F\n", pos));
- if(!be_liveness_nodes_live_at(arch_env, cls, pos, live));
+ be_liveness_nodes_live_at(arch_env, cls, pos, live);
n = pset_count(live);