Commit 9005e7f9 authored by Christian Würdig's avatar Christian Würdig
Browse files

removed unused function

fixed other_same constraint handling

[r13870]
parent 4478d0b8
......@@ -241,39 +241,6 @@ int co_is_optimizable_root(const copy_opt_t *co, ir_node *irn) {
return 0;
}
int co_is_optimizable_arg(const copy_opt_t *co, ir_node *irn) {
const ir_edge_t *edge;
const arch_register_t *reg;
assert(0 && "Is buggy and obsolete. Do not use");
if (arch_irn_is(co->aenv, irn, ignore))
return 0;
reg = arch_get_irn_register(co->aenv, irn);
if (arch_register_type_is(reg, ignore))
return 0;
foreach_out_edge(irn, edge) {
ir_node *n = edge->src;
if (!nodes_interfere(co->cenv, irn, n) || irn == n) {
const arch_register_req_t *req;
req = arch_get_register_req(co->aenv, n, -1);
if(is_Reg_Phi(n) ||
is_Perm(co->aenv, n) ||
(arch_register_req_is(req, should_be_same))) {
ir_node *other = get_irn_n(irn, req->other_same);
if(other == irn)
return 1;
}
}
}
return 0;
}
int co_get_costs_loop_depth(const copy_opt_t *co, ir_node *root, ir_node* arg, int pos) {
int cost = 0;
ir_loop *loop;
......@@ -487,7 +454,7 @@ static void co_collect_units(ir_node *irn, void *env) {
/* Src == Tgt of a 2-addr-code instruction */
if (is_2addr_code(req)) {
ir_node *other = get_irn_n(irn, req->other_same);
ir_node *other = get_irn_n(skip_Proj(irn), req->other_same);
if (!arch_irn_is(co->aenv, other, ignore) &&
!nodes_interfere(co->cenv, irn, other)) {
unit->nodes = xmalloc(2 * sizeof(*unit->nodes));
......
......@@ -87,11 +87,6 @@ void free_copy_opt(copy_opt_t *co);
*/
int co_is_optimizable_root(const copy_opt_t *co, ir_node *irn);
/**
* Checks if the irn is a non-interfering argument of a node which 'is_optimizable'
*/
int co_is_optimizable_arg(const copy_opt_t *co, ir_node *irn);
/**
* Computes the costs of a copy according to loop depth
* @param co The copy opt object.
......
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