public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Martin Jambor <mjambor@suse.cz>
To: GCC Patches <gcc-patches@gcc.gnu.org>
Cc: Jan Hubicka <hubicka@ucw.cz>
Subject: [PATCH 0/7] Change of call graph interface - cgraph_node function removal
Date: Wed, 06 Apr 2011 23:25:00 -0000	[thread overview]
Message-ID: <20110406232220.922143392@virgil.suse.cz> (raw)

Hi,

I'm sending this email describing the set of patches also to the gcc
mailing list because quite a few people do not follow the gcc-patches
mailing list (where I am sending the individual patches).

The patch set changes the interface of call graph and tries to avoid
lazy call graph node creation wherever easily possible.  Most
importantly, it removes the cgraph_node function.  The vast majority
of call graph users should call cgraph_get_node instead.  This
function does not create a node when it already does not exist but
returns NULL instead.  Users should check for this if that can happen
and might consider using gcc_checking_assert if it cannot but would
result in a failure at some later point (unlike in the previous
version of the patches, there is no cgraph_do_get_node doing this for
you).

In the very few cases where cgraph_get_node is not sufficient for you
because you need to create a node, two new functions for that purpose
are introduced.  cgraph_create_node creates a call graph node for a
declaration and aborts if it already exists.  cgraph_get_create_node
tries to find an existing node for a declaration and creates it if it
does not already exist.

Over the long term we would like to convert some more calls to
cgraph_get_create_node to other accessors (ideally it should be used
only in cgraphbuild.c) so please refrain from adding them unless you
absolutely have to.

I have successfully bootstrapped and tested the patches piecemeal on
x86_64-linux with "all,ada" languages (and enabled checking), I have
bootstrapped and tested the whole set with the same languages on i686,
I have verified that c and c++ testsuite passes on ia64 and a similar
test is in progress on sparc64.  Are the patches OK for trunk?

Thanks,

Martin


             reply	other threads:[~2011-04-06 23:25 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-06 23:25 Martin Jambor [this message]
2011-04-06 23:26 ` [PATCH 2/7] cgraph_node -> cgraph_get_node conversions accepting NULL results Martin Jambor
2011-04-11 10:18   ` Jan Hubicka
2011-04-11 13:33     ` Martin Jambor
2011-04-06 23:26 ` [PATCH 1/7] Simple cgraph_node -> cgraph_get_node conversions Martin Jambor
2011-04-11 10:13   ` Jan Hubicka
2011-04-13 13:09   ` H.J. Lu
2011-04-06 23:26 ` [PATCH 7/7] Tweaks to objc -> call graph interface Martin Jambor
2011-04-06 23:26 ` [PATCH 3/7] cgraph_node -> cgraph_get_node with asserts Martin Jambor
2011-04-11 10:20   ` Jan Hubicka
2011-04-06 23:26 ` [PATCH 5/7] Tweaks to C++ -> call graph interface Martin Jambor
2011-04-11 15:30   ` Jason Merrill
2011-04-06 23:26 ` [PATCH 4/7] Removal of cgraph_node function Martin Jambor
2011-04-11 10:28   ` Jan Hubicka
2011-04-11 14:15     ` Martin Jambor
2011-04-06 23:26 ` [PATCH 6/7] A tweak to fortran -> call graph interface Martin Jambor

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=20110406232220.922143392@virgil.suse.cz \
    --to=mjambor@suse.cz \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hubicka@ucw.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).