public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Guenther <richard.guenther@gmail.com>
To: Martin Jambor <mjambor@suse.cz>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>, Jan Hubicka <hubicka@ucw.cz>
Subject: Re: [PATCH 4/6] Remove unused ipa_note_param_call.called flag  	(approved)
Date: Sat, 13 Feb 2010 18:14:00 -0000	[thread overview]
Message-ID: <84fc9c001002131014m107f353csfb43134fdf39fd74@mail.gmail.com> (raw)
In-Reply-To: <20100213180157.398606971@alvy.suse.cz>

On Sat, Feb 13, 2010 at 7:01 PM, Martin Jambor <mjambor@suse.cz> wrote:
> This patch is a minor cleanup.  I have realized that the called flag
> in the ipa-prop parameter descriptor is not used and I could not
> really think how the flag can be obviously useful in a short-term
> either so I removed it.
>
> I have bootstrapped and tested this change along with the next one in
> the series.
>
> The patch has already been approved by Honza but this is its place in
> the series and so I re-send it along.

If this applies independently of the rest of the series it is ok for the trunk
at this stage.

Thanks,
Richard.

> Thanks,
>
> Martin
>
>
> 2009-12-28  Martin Jambor  <mjambor@suse.cz>
>
>        * ipa-prop.h (struct ipa_param_descriptor): Removed the called field.
>        (ipa_is_param_called): Removed.
>        * ipa-prop.c (ipa_note_param_call): Do not set the called flag.
>        Removed parameter info.
>        (ipa_print_node_params): Do not print the called flag.
>
> Index: icln/gcc/ipa-prop.c
> ===================================================================
> --- icln.orig/gcc/ipa-prop.c
> +++ icln/gcc/ipa-prop.c
> @@ -736,20 +736,16 @@ ipa_is_ssa_with_stmt_def (tree t)
>  }
>
>  /* Create a new indirect call graph edge describing a call to a parameter
> -   number FORMAL_ID and and set the called flag of the parameter.  NODE is the
> -   caller and is described by INFO.  STMT is the corresponding call
> +   number FORMAL_ID.  NODE is the caller, STMT is the corresponding call
>    statement.  */
>
>  static void
> -ipa_note_param_call (struct cgraph_node *node, struct ipa_node_params *info,
> -                    int formal_id, gimple stmt)
> +ipa_note_param_call (struct cgraph_node *node, int formal_id, gimple stmt)
>  {
>   struct cgraph_edge *cs;
>   basic_block bb = gimple_bb (stmt);
>   int freq;
>
> -  info->params[formal_id].called = 1;
> -
>   freq = compute_call_stmt_bb_frequency (current_function_decl, bb);
>   cs = cgraph_create_indirect_edge (node, stmt, bb->count, freq,
>                                    bb->loop_depth);
> @@ -826,7 +822,7 @@ ipa_analyze_call_uses (struct cgraph_nod
>       /* assuming TREE_CODE (var) == PARM_DECL */
>       index = ipa_get_param_decl_index (info, var);
>       if (index >= 0)
> -       ipa_note_param_call (node, info, index, call);
> +       ipa_note_param_call (node, index, call);
>       return;
>     }
>
> @@ -923,7 +919,7 @@ ipa_analyze_call_uses (struct cgraph_nod
>
>   index = ipa_get_param_decl_index (info, rec);
>   if (index >= 0 && !ipa_is_param_modified (info, index))
> -    ipa_note_param_call (node, info, index, call);
> +    ipa_note_param_call (node, index, call);
>
>   return;
>  }
> @@ -1405,8 +1401,6 @@ ipa_print_node_params (FILE * f, struct
>                   : "(unnamed)"));
>       if (ipa_is_param_modified (info, i))
>        fprintf (f, " modified");
> -      if (ipa_is_param_called (info, i))
> -       fprintf (f, " called");
>       fprintf (f, "\n");
>     }
>  }
> Index: icln/gcc/ipa-prop.h
> ===================================================================
> --- icln.orig/gcc/ipa-prop.h
> +++ icln/gcc/ipa-prop.h
> @@ -143,8 +143,6 @@ struct ipa_param_descriptor
>   tree decl;
>   /* Whether the value parameter has been modified within the function.  */
>   unsigned modified : 1;
> -  /* Whether the parameter has been used as a call destination. */
> -  unsigned called : 1;
>  };
>
>  /* ipa_node_params stores information related to formal parameters of functions
> @@ -220,17 +218,6 @@ ipa_is_param_modified (struct ipa_node_p
>   return info->params[i].modified;
>  }
>
> -/* Return the called flag corresponding to the Ith formal parameter of the
> -   function associated with INFO.  Note that there is no setter method as the
> -   goal is to set all flags when building the array in
> -   ipa_detect_called_params.  */
> -
> -static inline bool
> -ipa_is_param_called (struct ipa_node_params *info, int i)
> -{
> -  return info->params[i].called;
> -}
> -
>  /* Flag this node as having callers with variable number of arguments.  */
>
>  static inline void
>
>

  reply	other threads:[~2010-02-13 18:14 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-13 18:03 [PATCH 0/6] Cgraph changes and various devirtualizations Martin Jambor
2010-02-13 18:03 ` [PATCH 1/6] Clarify edge redirection for inline clones Martin Jambor
2010-02-22 14:23   ` Jan Hubicka
2010-02-13 18:04 ` [PATCH 5/6] Indirect inlining of virtual calls Martin Jambor
2010-02-22 16:49   ` Jan Hubicka
2010-03-10 13:45     ` Martin Jambor
2010-03-10 15:24       ` Jan Hubicka
2010-02-13 18:04 ` [PATCH 3/6] Folding " Martin Jambor
2010-02-13 18:12   ` Richard Guenther
2010-02-13 18:04 ` [PATCH 6/6] Devirtualization in ipa-cp Martin Jambor
2010-02-22 16:37   ` Jan Hubicka
2010-03-11 13:42     ` Martin Jambor
2010-02-13 18:04 ` [PATCH 4/6] Remove unused ipa_note_param_call.called flag (approved) Martin Jambor
2010-02-13 18:14   ` Richard Guenther [this message]
2010-03-05 16:19     ` Martin Jambor
2010-02-22 15:04   ` Jan Hubicka
2010-02-13 18:04 ` [PATCH 2/6] Indirect call graph edges Martin Jambor
2010-02-13 18:17   ` Richard Guenther
2010-02-13 18:25     ` Richard Guenther
2010-03-05 17:06       ` Martin Jambor
2010-02-22 15:52   ` Jan Hubicka
2010-02-22 16:05     ` Richard Guenther
2010-02-22 16:06       ` Jan Hubicka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=84fc9c001002131014m107f353csfb43134fdf39fd74@mail.gmail.com \
    --to=richard.guenther@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hubicka@ucw.cz \
    --cc=mjambor@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).