From: Jan Hubicka <hubicka@ucw.cz>
To: "Martin Liška" <mliska@suse.cz>
Cc: gcc-patches@gcc.gnu.org, Jan Hubicka <hubicka@ucw.cz>
Subject: Re: [PATCH 2/5] Existing call graph infrastructure enhancement
Date: Mon, 25 Aug 2014 16:12:00 -0000 [thread overview]
Message-ID: <20140825161224.GA10501@kam.mff.cuni.cz> (raw)
In-Reply-To: <53FB0826.6080105@suse.cz>
> Hello,
> after fixing an issue with callgraph thunk creation, I would like to enhance callgraph API a bit. My problem was that I was trying to expand_thunk after a body of the original function was removed. As a result, I created a call without arguments. The change was suggested by Honza.
>
> Thank you,
> Martin
>
> On 07/17/2014 03:49 PM, Martin Liška wrote:
> >
> >On 06/30/2014 08:54 PM, Jeff Law wrote:
> >>On 06/30/14 05:49, Martin Liška wrote:
> >>>
> >>>On 06/17/2014 10:00 PM, Jeff Law wrote:
> >>>>On 06/13/14 04:26, mliska wrote:
> >>>>>Hi,
> >>>>> this small patch prepares remaining needed infrastructure for
> >>>>>the new pass.
> >>>>>
> >>>>>Changelog:
> >>>>>
> >>>>>2014-06-13 Martin Liska <mliska@suse.cz>
> >>>>> Honza Hubicka <hubicka@ucw.cz>
> >>>>>
> >>>>> * ipa-utils.h (polymorphic_type_binfo_p): Function marked external
> >>>>> instead of static.
> >>>>> * ipa-devirt.c (polymorphic_type_binfo_p): Likewise.
> >>>>> * ipa-prop.h (count_formal_params): Likewise.
> >>>>> * ipa-prop.c (count_formal_params): Likewise.
> >>>>> * ipa-utils.c (ipa_merge_profiles): Be more tolerant if we merge
> >>>>> profiles for semantically equivalent functions.
> >>>>> * passes.c (do_per_function): If we load body of a function
> >>>>>during WPA,
> >>>>> this condition should behave same.
> >>>>> * varpool.c (ctor_for_folding): More tolerant assert for variable
> >>>>> aliases created during WPA.
> >>>>Presumably we don't have any useful way to merge the cases where we
> >>>>have provides for SRC & DST in ipa_merge_profiles or even to guess
> >>>>which is more useful when presented with both? Does it make sense to
> >>>>log this into a debugging file when we drop one?
> >>>Hello,
> >>> this merge function was written by Honza, what do you think Honza
> >>>about this note?
> >>>
> >>>>I think this patch is fine. If adding logging makes sense, then feel
> >>>>free to do so and consider that trivial change pre-approved.
> >>>I made a small change to this patch, where I moved
> >>>'gsi_next_nonvirtual_phi' from the pass to gimple-iterator.h.
> >>>
> >>>Ready for trunk with this change?
> >>Yes. I think with the exception of patch #3/5 everything looks good. I'll try to get another pass over #3 this week. What I looked at last week was pretty good; I'm pretty confident this will be wrapped up shortly.
> >>
> >>If #1/#2 make sense to install independent of #3, go ahead. #4/#5 are obviously dependent on #3.
> >>
> >>Jeff
> >
> >Hello,
> > thank you for approval, this final version removes few hunks that are not needed any more. Changes are just cosmetic and I will commit the patch at the beginning of next week.
> >
> >Thanks,
> >Martin
> >
>
> 2014-08-25 Martin Liska <mliska@suse.cz>
>
> * cgraph.h (release_body): new argument keep_arguments added.
> * cgraph.c (release_body): Likewise.
OK,
thanks!
Honza
> diff --git a/gcc/cgraph.c b/gcc/cgraph.c
> index cb49cdc..ad32fb8 100644
> --- a/gcc/cgraph.c
> +++ b/gcc/cgraph.c
> @@ -1716,13 +1716,15 @@ release_function_body (tree decl)
> are free'd in final.c via free_after_compilation(). */
>
> void
> -cgraph_node::release_body (void)
> +cgraph_node::release_body (bool keep_arguments)
> {
> ipa_transforms_to_apply.release ();
> if (!used_as_abstract_origin && cgraph_state != CGRAPH_STATE_PARSING)
> {
> DECL_RESULT (decl) = NULL;
> - DECL_ARGUMENTS (decl) = NULL;
> +
> + if (!keep_arguments)
> + DECL_ARGUMENTS (decl) = NULL;
> }
> /* If the node is abstract and needed, then do not clear DECL_INITIAL
> of its associated function function declaration because it's
> diff --git a/gcc/cgraph.h b/gcc/cgraph.h
> index 2594ae5..5edcf74 100644
> --- a/gcc/cgraph.h
> +++ b/gcc/cgraph.h
> @@ -890,7 +890,7 @@ public:
> Use this only for functions that are released before being translated to
> target code (i.e. RTL). Functions that are compiled to RTL and beyond
> are free'd in final.c via free_after_compilation(). */
> - void release_body (void);
> + void release_body (bool keep_arguments = false);
>
> /* cgraph_node is no longer nested function; update cgraph accordingly. */
> void unnest (void);
next prev parent reply other threads:[~2014-08-25 16:12 UTC|newest]
Thread overview: 70+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-16 10:07 [PATCH 1/5] New Identical Code Folding IPA pass mliska
2014-06-16 10:07 ` [PATCH 5/5] New tests introduction mliska
2014-06-17 19:53 ` Jeff Law
2014-06-30 12:14 ` Martin Liška
2014-10-19 8:19 ` Andreas Schwab
2014-10-23 12:34 ` Martin Liška
2014-06-16 10:07 ` [PATCH 3/5] IPA ICF pass mliska
2014-06-20 7:32 ` Trevor Saunders
2014-06-26 11:18 ` Martin Liška
2014-07-05 21:44 ` Gerald Pfeifer
2014-07-05 22:53 ` Jan Hubicka
2014-07-17 15:23 ` Martin Liška
2014-09-26 12:20 ` Martin Liška
2014-09-26 14:44 ` Markus Trippelsdorf
2014-09-26 23:27 ` Jan Hubicka
2014-09-27 5:59 ` Markus Trippelsdorf
2014-09-27 7:47 ` Markus Trippelsdorf
2014-09-27 10:46 ` Martin Liška
2014-09-27 10:37 ` Martin Liška
2014-09-28 2:21 ` Jan Hubicka
2014-10-10 23:54 ` Fakturace
2014-10-11 0:02 ` Martin Liška
2014-10-11 8:23 ` Jan Hubicka
2014-10-13 13:20 ` Martin Liška
2014-10-13 13:29 ` Jan Hubicka
2014-09-27 10:32 ` Martin Liška
2014-09-26 20:47 ` Jan Hubicka
2014-10-11 0:08 ` Martin Liška
2014-10-11 8:26 ` Jan Hubicka
2014-10-13 15:17 ` Martin Liška
2014-10-14 16:12 ` Jan Hubicka
2014-10-15 17:06 ` Martin Liška
2014-10-22 21:20 ` Jiong Wang
2014-11-06 3:01 ` Joey Ye
2014-11-06 9:03 ` Jan Hubicka
2014-11-13 22:26 ` H.J. Lu
2015-01-20 21:29 ` H.J. Lu
2014-09-26 22:27 ` Jan Hubicka
2014-10-11 0:23 ` Martin Liška
2014-10-11 9:05 ` Jan Hubicka
2014-06-24 20:31 ` Jeff Law
2014-06-26 16:02 ` Martin Liška
2014-06-26 18:46 ` Jan Hubicka
2014-06-30 12:05 ` Martin Liška
2014-07-01 23:45 ` Trevor Saunders
2014-06-30 19:06 ` Jeff Law
2014-06-16 10:07 ` [PATCH 2/5] Existing call graph infrastructure enhancement mliska
2014-06-17 20:00 ` Jeff Law
2014-06-30 11:49 ` Martin Liška
2014-06-30 18:54 ` Jeff Law
2014-07-17 14:54 ` Martin Liška
2014-08-25 9:56 ` Martin Liška
2014-08-25 16:12 ` Jan Hubicka [this message]
2014-08-27 21:12 ` Jeff Law
2014-09-24 14:23 ` Martin Liška
2014-09-24 15:01 ` Jan Hubicka
2014-09-26 10:19 ` Martin Liška
2014-06-16 10:07 ` [PATCH 4/5] Existing tests fix mliska
2014-06-17 19:52 ` Jeff Law
2014-06-17 20:50 ` Rainer Orth
2014-06-18 9:02 ` Martin Liška
2014-06-30 12:12 ` Martin Liška
2014-09-26 12:21 ` Martin Liška
2014-06-17 19:49 ` [PATCH 1/5] New Identical Code Folding IPA pass Jeff Law
2014-06-18 19:05 ` Jan Hubicka
2014-06-17 20:09 ` Paolo Carlini
2014-06-18 8:46 ` Martin Liška
2014-06-18 8:49 ` Paolo Carlini
2014-06-17 20:17 ` David Malcolm
2014-06-18 8:10 ` Martin Liška
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=20140825161224.GA10501@kam.mff.cuni.cz \
--to=hubicka@ucw.cz \
--cc=gcc-patches@gcc.gnu.org \
--cc=mliska@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).