This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Unit at time compilation mode II
- From: Graham Stott <graham dot stott at btinternet dot com>
- To: Jan Hubicka <jh at suse dot cz>
- Cc: gcc-patches at gcc dot gnu dot org, rth at cygnus dot com
- Date: Mon, 10 Feb 2003 21:34:35 +0000
- Subject: Re: Unit at time compilation mode II
- References: <20030210211453.GO6688@kam.mff.cuni.cz>
Jan,
Jan Hubicka wrote:
Hi,
previous version had bug in defering functions (so without
-funit-at-time it never inlined into deferred functions) and updating of
callgraph after inlining.
Regtested/bootstrapped i386. OK?
For such a chunk of new code how about doing bootstraps/testing on more than one
target.
Index: callgraph.c
===================================================================
+
+ #include "config.h"
+ #include "coretypes.h"
+ #include "tm.h"
+ #include "system.h"
system.h needs to be included after config.h
+ static void
+ remove_edge (caller, callee)
+ struct cgraph_node *caller, *callee;
+ {
+ struct cgraph_edge **edge, **edge2;
+
+ for (edge = &callee->callers; *edge && (*edge)->caller != caller;
+ edge = &((*edge)->next_caller))
+ ;
How about using "continue" here it's a bit more visible than just a semicolon.
+ bool
+ cgraph_calls_p (caller_decl, callee_decl)
+ tree caller_decl, callee_decl;
+ {
+ struct cgraph_node *caller = cgraph_node (caller_decl);
+ struct cgraph_node *callee = cgraph_node (callee_decl);
+ struct cgraph_edge *edge;
+
+ for (edge = callee->callers; edge && (edge)->caller != caller;
+ edge = (edge->next_caller))
+ ;
ditto here.
+ static tree
+ record_call_1 (tp, walk_subtrees, data)
+ tree *tp;
+ int *walk_subtrees ATTRIBUTE_UNUSED;
Why mark it unused it's definately used
Cheers
Graham