public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jan Hubicka <hubicka@ucw.cz>
To: GCC Patches <gcc-patches@gcc.gnu.org>, Jan Hubicka <hubicka@ucw.cz>
Subject: Re: [PATCH, PR 48195] Move around ipa_check_create_node_params and	ipa_check_create_edge_args
Date: Mon, 11 Apr 2011 10:34:00 -0000	[thread overview]
Message-ID: <20110411103422.GA16011@kam.mff.cuni.cz> (raw)
In-Reply-To: <20110329115206.GA9794@virgil.arch.suse.de>

> Bootstrapped and tested on x86_64-linux on both trunk and 4.6 branch
> without any issues.  OK for both?

OK, please add changelog ;)
I always wondered why we do the resizing in such a convoluted way.

Honza
> 
> Thanks,
> 
> Martin
> 
> 
> Index: src/gcc/ipa-cp.c
> ===================================================================
> --- src.orig/gcc/ipa-cp.c
> +++ src/gcc/ipa-cp.c
> @@ -1516,6 +1516,8 @@ ipcp_driver (void)
>          ipa_print_all_params (dump_file);
>        ipa_print_all_jump_functions (dump_file);
>      }
> +  ipa_check_create_node_params ();
> +  ipa_check_create_edge_args ();
>    /* 2. Do the interprocedural propagation.  */
>    ipcp_iterate_stage ();
>    /* 3. Insert the constants found to the functions.  */
> @@ -1543,8 +1545,6 @@ ipcp_generate_summary (void)
>  
>    if (dump_file)
>      fprintf (dump_file, "\nIPA constant propagation start:\n");
> -  ipa_check_create_node_params ();
> -  ipa_check_create_edge_args ();
>    ipa_register_cgraph_hooks ();
>  
>    for (node = cgraph_nodes; node; node = node->next)
> Index: src/gcc/ipa-inline.c
> ===================================================================
> --- src.orig/gcc/ipa-inline.c
> +++ src/gcc/ipa-inline.c
> @@ -2091,11 +2091,7 @@ inline_generate_summary (void)
>        cgraph_add_function_insertion_hook (&add_new_function, NULL);
>  
>    if (flag_indirect_inlining)
> -    {
> -      ipa_register_cgraph_hooks ();
> -      ipa_check_create_node_params ();
> -      ipa_check_create_edge_args ();
> -    }
> +    ipa_register_cgraph_hooks ();
>  
>    for (node = cgraph_nodes; node; node = node->next)
>      if (node->analyzed)
> Index: src/gcc/ipa-prop.c
> ===================================================================
> --- src.orig/gcc/ipa-prop.c
> +++ src/gcc/ipa-prop.c
> @@ -1522,10 +1522,13 @@ ipa_analyze_params_uses (struct cgraph_n
>  void
>  ipa_analyze_node (struct cgraph_node *node)
>  {
> -  struct ipa_node_params *info = IPA_NODE_REF (node);
> +  struct ipa_node_params *info;
>    struct param_analysis_info *parms_info;
>    int i, param_count;
>  
> +  ipa_check_create_node_params ();
> +  ipa_check_create_edge_args ();
> +  info = IPA_NODE_REF (node);
>    push_cfun (DECL_STRUCT_FUNCTION (node->decl));
>    current_function_decl = node->decl;
>    ipa_initialize_node_params (node);
> Index: src/gcc/testsuite/gcc.dg/ipa/pr48195.c
> ===================================================================
> --- /dev/null
> +++ src/gcc/testsuite/gcc.dg/ipa/pr48195.c
> @@ -0,0 +1,24 @@
> +/* { dg-do link } */
> +/* { dg-options "-O2 -flto --param partial-inlining-entry-probability=101" } */
> +
> +extern void abort(void);
> +
> +int i;
> +
> +void __attribute__ ((constructor))
> +c2 ()
> +{
> +  if (i)
> +    abort ();
> +}
> +
> +void __attribute__ ((destructor))
> +d1 ()
> +{
> +  if (i)
> +    abort ();
> +}
> +
> +void main ()
> +{
> +}

      reply	other threads:[~2011-04-11 10:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-29 11:52 Martin Jambor
2011-04-11 10:34 ` Jan Hubicka [this message]

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=20110411103422.GA16011@kam.mff.cuni.cz \
    --to=hubicka@ucw.cz \
    --cc=gcc-patches@gcc.gnu.org \
    /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).