X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fopt%2Fproc_cloning.c;h=d126754937cca6c44776be38abb42882abda1230;hb=8c9921a1fc166552f6e416434fd8394a4fc210a3;hp=119ba7081770b7fd273d822e5302f4444f40989f;hpb=a88bcf9f8b48eefb74e3011f6ac6bfcd468183e5;p=libfirm diff --git a/ir/opt/proc_cloning.c b/ir/opt/proc_cloning.c index 119ba7081..d12675493 100644 --- a/ir/opt/proc_cloning.c +++ b/ir/opt/proc_cloning.c @@ -21,7 +21,6 @@ * @file * @brief Procedure cloning. * @author Beyhan Veliev, Michael Beck - * @version $Id$ * @brief * * The purpose is first to find and analyze functions, that are called @@ -120,18 +119,17 @@ static void kill_entry(entry_t *entry) */ static void process_call(ir_node *call, ir_entity *callee, q_set *hmap) { - ir_type *mtp; entry_t *key, *entry; ir_node *call_param; size_t i, n_params; n_params = get_Call_n_params(call); - /* Beware: we cannot clone variadic parameters as well as the + /* TODO + * Beware: we cannot clone variadic parameters as well as the * last non-variadic one, which might be needed for the va_start() * magic */ - mtp = get_Call_type(call); /* In this for loop we collect the calls, that have an constant parameter. */ @@ -184,10 +182,10 @@ static void collect_irg_calls(ir_node *call, void *env) if (is_Call(call)) { call_ptr = get_Call_ptr(call); - if (! is_Global(call_ptr)) + if (! is_SymConst_addr_ent(call_ptr)) return; - callee = get_Global_entity(call_ptr); + callee = get_SymConst_entity(call_ptr); /* we don't know which function gets finally bound to a weak symbol */ if (get_entity_linkage(callee) & IR_LINKAGE_WEAK) @@ -311,7 +309,7 @@ static ir_node *get_irg_arg(ir_graph *irg, size_t pos) /* Search the argument with the number pos.*/ for (i = get_irn_n_outs(irg_args) - 1; i >= 0; --i) { ir_node *proj = get_irn_out(irg_args, i); - if (pos == get_Proj_proj(proj)) { + if ((int)pos == get_Proj_proj(proj)) { if (arg) { /* * More than one arg node found: @@ -412,7 +410,6 @@ static ir_entity *clone_method(const quadruple_t *q) { ir_entity *new_entity; ident *clone_ident; - symconst_symbol sym; /* A counter for the clones.*/ static size_t nr = 0; @@ -433,9 +430,6 @@ static ir_entity *clone_method(const quadruple_t *q) /* We need now a new ir_graph for our clone method. */ create_clone_proc_irg(new_entity, q); - /* We must set the atomic value of our "new_entity". */ - sym.entity_p = new_entity; - /* The "new_entity" don't have this information. */ new_entity->attr.mtd_attr.param_access = NULL; new_entity->attr.mtd_attr.param_weight = NULL;