Use opt_manage framework for tailrec
[libfirm] / ir / opt / proc_cloning.c
index 0e4141d..ab5d99a 100644 (file)
@@ -126,7 +126,8 @@ static void process_call(ir_node *call, ir_entity *callee, q_set *hmap)
 
        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
         */
@@ -182,10 +183,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)