On Jun 10, 2011, at 6:55 PM, Jan Hubicka wrote:

> Hi,
> this patch updated ipa-cp and ipa-prop for aliases.  It is basically easy - 
> we don't
> analyze nodes represneting aliases and when propagating we skip them, like 
> everywhere
> else.
...
> @@ -759,7 +768,8 @@ ipcp_propagate_stage (void)
> 
>       for (cs = node->callees; cs; cs = cs->next_callee)
>       {
> -       struct ipa_node_params *callee_info = IPA_NODE_REF (cs->callee);
> +       struct cgraph_node *callee = cgraph_function_or_thunk_node 
> (cs->callee, NULL);
> +       struct ipa_node_params *callee_info = IPA_NODE_REF (callee);
>         struct ipa_edge_args *args = IPA_EDGE_REF (cs);
> 
>         if (ipa_is_called_with_var_arguments (callee_info)
> @@ -778,11 +788,11 @@ ipcp_propagate_stage (void)
>               {
>                 dest_lat->type = new_lat.type;
>                 dest_lat->constant = new_lat.constant;
> -               ipa_push_func_to_list (&wl, cs->callee);
> +               ipa_push_func_to_list (&wl, callee);
>               }
> 
>             if (ipcp_propagate_types (info, callee_info, jump_func, i))
> -             ipa_push_func_to_list (&wl, cs->callee);
> +             ipa_push_func_to_list (&wl, callee);
>           }
>       }
>     }

Jan,

I have a question about the above hunk.  With this hunk you replace all uses of 
'cs->callee' with 'callee' in ipcp_propagate_stage() except for in the check:

          if (ipa_is_called_with_var_arguments (callee_info)
              || !cs->callee->analyzed
              || ipa_is_called_with_var_arguments (callee_info))
            continue;

Is there a reason why you left 'cs->callee' intact in this case?

Thank you,

--
Maxim Kuvyrkov
CodeSourcery / Mentor Graphics

Reply via email to