This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Unit at time compilation mode II


On Tue, Feb 11, 2003 at 11:37:48AM +0100, Jan Hubicka wrote:
> 	* Makefile.in (CRTSTUFF_CFLAGS): Add -fno-unit-at-time

Why did you need this?  If we failed to emit something, then it
means that either we're missing an __attribute__((used)), or
you've a bug in your callgraph code.

> ! 	 Generate RTL for the body of this function or deffer

Typo for "defer".

> +   node = xcalloc (sizeof (*node), 1);

Reversed arguments.

> + /* Create edge from CALLER to CALLEE in the cgraph.  */
> + 
> + static void
> + remove_edge (caller, callee)

Paste-o in comment.

> +   while (changed)
> +     {
> +       changed = false;
> +       for (node = cgraph_nodes; node; node = node->next)
> + 	{
	  ...
> + 	  changed = true;

I think you want a work list instead.  Perhaps threaded through the
nodes themselves, to avoid memory management hassles.  As is, you've
got O(N**2) traversal.

> + cgraph_expand_functions ()

I think you ought to split this apart into multiple sub functions.

The rest of it looks reasonable.


r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]