Hi,

On Wed, Jun 26 2019, Martin Liška wrote:
> Hi.
>
> I've spent some with clang-static-analyzer and I analyzed the warnings 
> reported.
> As always wit analyzers, majority of the issues are false positives, however 
> it caught
> couple of real issues:
>
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90973
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90978
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90976
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90975
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90970
>
> That said, I'm sending a patch that rapidly shrinks number of Dead 
> assignments.
> I've chosen to remove only these that are quite trivial and that do not span
> among multiple if-else branches.
>
> I hope the patch will be readable and approved.
>
> Patch can bootstrap on x86_64-linux-gnu and survives regression tests. I'm
> also testing that on ppc64 big endian machine.
>
> Ready to be installed?
> Thanks,
> Martin
>
>
> gcc/ChangeLog:
>
> 2019-06-26  Martin Liska  <mli...@suse.cz>
>
>       * ipa-cp.c (cgraph_edge_brings_all_agg_vals_for_node): Likewise.

The ipa-cp.c hunk is obvious, I'd say.

Thanks,

Martin


> diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c
> index 69c00a9c5a5..b6e781f7450 100644
> --- a/gcc/ipa-cp.c
> +++ b/gcc/ipa-cp.c
> @@ -4445,7 +4445,6 @@ static bool
>  cgraph_edge_brings_all_agg_vals_for_node (struct cgraph_edge *cs,
>                                         struct cgraph_node *node)
>  {
> -  struct ipa_node_params *orig_caller_info = IPA_NODE_REF (cs->caller);
>    struct ipa_node_params *orig_node_info;
>    struct ipa_agg_replacement_value *aggval;
>    int i, ec, count;
> @@ -4462,8 +4461,6 @@ cgraph_edge_brings_all_agg_vals_for_node (struct 
> cgraph_edge *cs,
>       return false;
>  
>    orig_node_info = IPA_NODE_REF (IPA_NODE_REF (node)->ipcp_orig_node);
> -  if (orig_caller_info->ipcp_orig_node)
> -    orig_caller_info = IPA_NODE_REF (orig_caller_info->ipcp_orig_node);
>  
>    for (i = 0; i < count; i++)
>      {

Reply via email to