public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 0/7] Change of call graph interface - cgraph_node function removal
@ 2011-04-06 23:25 Martin Jambor
  2011-04-06 23:26 ` [PATCH 4/7] Removal of cgraph_node function Martin Jambor
                   ` (6 more replies)
  0 siblings, 7 replies; 16+ messages in thread
From: Martin Jambor @ 2011-04-06 23:25 UTC (permalink / raw)
  To: GCC Patches; +Cc: Jan Hubicka

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


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2011-04-13 13:09 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-06 23:25 [PATCH 0/7] Change of call graph interface - cgraph_node function removal Martin Jambor
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
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 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 5/7] Tweaks to C++ -> call graph interface Martin Jambor
2011-04-11 15:30   ` Jason Merrill
2011-04-06 23:26 ` [PATCH 3/7] cgraph_node -> cgraph_get_node with asserts Martin Jambor
2011-04-11 10:20   ` Jan Hubicka

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).