Jan Hubicka | 1 Sep 2003 11:00
Picon

Cleanup C frontend function deferring

Hi,
this patch removes function deffering mechanizm from C frontend and moves it to
cgraph code only.  The cgraph code is also updated to deal with
non-unit-at-a-time compilation.  This avoids code duplication in between the
frontend and cgraphunit and moves all the rather complicated decisions about
what to compile when into one place (in fact it has been surprisingly dificult
to get it "right" so we pass all the checks in the testsuite).

I would like to update the other frontends the same way gradually even when it
won't be easy at all for C++, but the code duplication in the compilation
driving logic is unforutnate.

I also implemented incremental inlining decision heuristics sharing
infrastructure with current unit-at-a-time inlining heuristics code that seems
to be superrior to the current one in tree-inline.c, but I guess this should
not go in before all frontends are moved to cgraph code as we don't want to
have three different heuristics to tune at once, so this won't happen before
3.3 is out.

Honza

Sun Aug 31 22:00:39 CEST 2003  Jan Hubicka  <jh <at> suse.cz>
	* Makefile.in (c-objc-common.o): Kill gt-c-objc-common.h dependency.
	* c-decl.c (finish_function):  Kill arguments, always use cgraph path.
	* c-objc-common.c: Kill include of gt-c-objc-common.h
	(expand_deferred_fns, deffer_fn): Kill function.
	(deferred_fns): Kill variable.
	(finish_cdtor): Update finish_function call.
	(c_objc_common_finish_file): Always call cgraph code.
	* c-parse.c: Regenerate.
(Continue reading)

Richard Henderson | 1 Sep 2003 11:25
Picon
Favicon

Re: Move C_DECL_FILE_SCOPE to tree.h

On Sun, Aug 31, 2003 at 12:53:54PM -0700, Geoff Keating wrote:
> Could you explain more what you mean by 'file scope'?  Scopes are a
> language-specific property, as are files.  I hope we're not limiting
> functions-as-trees to work only on languages that look like C.

If and when some other language is added to gcc that has a 
different sort of scopeness than C, we can add a lang hook
to deal with it.  Until then it's sort of pointless.

r~

Nathanael Nerode | 1 Sep 2003 19:28
Picon

[committed] Break out config.host from config.gcc

Committing.  There's lots of cleanup opportunities after this, which I have
not yet taken.

Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ChangeLog,v
retrieving revision 2.934
diff -u -r2.934 ChangeLog
--- ChangeLog	1 Sep 2003 05:02:04 -0000	2.934
+++ ChangeLog	1 Sep 2003 17:26:03 -0000
 <at>  <at>  -1,3 +1,11  <at>  <at> 
+2003-09-01  Nathanael Nerode  <neroden <at> gcc.gnu.org>
+
+	* config.host: New file.
+	* config.gcc: Remove some host-specific stuff and some
+	logic needed only for repeated invocation.
+	* configure.in: Use config.host.
+	* configure: Regenerate.
+
 2003-09-01  Josef Zlomek  <zlomekj <at> suse.cz>

 	* c-typeck.c (build_binary_op): Kill BIT_ANDTC_EXPR.
Index: config.gcc
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config.gcc,v
retrieving revision 1.351
diff -u -r1.351 config.gcc
--- config.gcc	31 Aug 2003 19:11:42 -0000	1.351
+++ config.gcc	1 Sep 2003 17:25:33 -0000
 <at>  <at>  -1,4 +1,4  <at>  <at> 
(Continue reading)

Zack Weinberg | 1 Sep 2003 19:30

Fix bootstrap failure due to complete types with nonnull C_TYPE_INCOMPLETE_VARS


This patch solves the recent bootstrap failures due to ICE in dbxout.c
or dwarf2out.c.  The bug was an incorrect assumption in c-decl.c: that
if a variable had an incomplete type, and that type was composed from
a struct or union type, that type must also be incomplete.  There are
several exceptions, perhaps the most important being array-of-structure 
variables with unspecified length.  Thus, variables were getting
attached to the C_TYPE_INCOMPLETE_VARS chain for complete types, which
exposed this front-end-private concept to dbxout/dwarf2out, which did
not understand it.  (The type field being used for C_TYPE_INCOMPLETE_VARS
in the C front end has several other uses - it's not used for anything
else in RECORD_TYPE and UNION_TYPE nodes in C, but the debug info
generators don't know that, nor should they.)

Attaching these variables to C_TYPE_INCOMPLETE_VARS for anything is
unnecessary; their incompleteness is handled through other means.
Hence the appended patch.

Bootstrapped on sparc-sun-solaris2.9 with and without --enable-dwarf2,
thanks to Andreas Tobler for testing.

zw

        * c-decl.c (pushdecl): Don't put variables on
        C_TYPE_INCOMPLETE_VARS of a type unless that type is itself
        incomplete.

===================================================================
Index: c-decl.c
--- c-decl.c	30 Aug 2003 21:24:19 -0000	1.439
(Continue reading)

Nathanael Nerode | 1 Sep 2003 19:42
Picon

[committed] Doc patch for config.host

Passed 'make info'.  Committed.

	* doc/fragments.texi: Mention config.host.
	* doc/sourcebuild.texi: Mention config.host.  Give brief descriptions
	of config.build, config.host, and config.gcc.

Index: fragments.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/fragments.texi,v
retrieving revision 1.6
diff -u -r1.6 fragments.texi
--- fragments.texi	31 Aug 2003 19:00:39 -0000	1.6
+++ fragments.texi	1 Sep 2003 17:41:10 -0000
 <at>  <at>  -13,7 +13,8  <at>  <at> 
 fragments from the  <at> file{config} directory.  These are used to set
 Makefile parameters that are not amenable to being calculated by
 autoconf.  The list of fragments to incorporate is set by
- <at> file{config.gcc} (and occasionally  <at> file{config.build});  <at> xref{System Config}.
+ <at> file{config.gcc} (and occasionally  <at> file{config.build}
+and  <at> file{config.host});  <at> xref{System Config}.

 Fragments are named either  <at> file{t- <at> var{target}} or  <at> file{x- <at> var{host}},
 depending on whether they are relevant to configuring GCC to produce
Index: sourcebuild.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/sourcebuild.texi,v
retrieving revision 1.29
diff -u -r1.29 sourcebuild.texi
--- sourcebuild.texi	31 Aug 2003 19:00:39 -0000	1.29
+++ sourcebuild.texi	1 Sep 2003 17:41:16 -0000
(Continue reading)

Geoff Keating | 1 Sep 2003 19:50

Re: Cleanup C frontend function deferring

Jan Hubicka <jh <at> suse.cz> writes:

> Hi,
> this patch removes function deffering mechanizm from C frontend and moves it to
> cgraph code only.  The cgraph code is also updated to deal with
> non-unit-at-a-time compilation.  This avoids code duplication in between the
> frontend and cgraphunit and moves all the rather complicated decisions about
> what to compile when into one place (in fact it has been surprisingly dificult
> to get it "right" so we pass all the checks in the testsuite).
> 
> I would like to update the other frontends the same way gradually even when it
> won't be easy at all for C++, but the code duplication in the compilation
> driving logic is unforutnate.
> 
> I also implemented incremental inlining decision heuristics sharing
> infrastructure with current unit-at-a-time inlining heuristics code that seems
> to be superrior to the current one in tree-inline.c, but I guess this should
> not go in before all frontends are moved to cgraph code as we don't want to
> have three different heuristics to tune at once, so this won't happen before
> 3.3 is out.
> 
> Honza
> 
> Sun Aug 31 22:00:39 CEST 2003  Jan Hubicka  <jh <at> suse.cz>
> 	* Makefile.in (c-objc-common.o): Kill gt-c-objc-common.h dependency.

You should probably also change the definition of GTFILES...

(I bet there's a way to do this with GNU make that doesn't require you
to change three places every time you add or remove the only GTY in
(Continue reading)

Gabriel Dos Reis | 1 Sep 2003 19:55

Re: Cleanup C frontend function deferring

Geoff Keating <geoffk <at> geoffk.org> writes:

| (I bet there's a way to do this with GNU make that doesn't require you
| to change three places every time you add or remove the only GTY in
| a file.)

That would be very helpful.  I, for one, almost forget to update that
variable -- and I do read the docs :-/

-- Gaby

Nathanael Nerode | 1 Sep 2003 19:57
Picon

[committed] Clean host-specific stuff out of config.gcc

Simplest cleanup.  Configured on i686-pc-linux-gnu, committed.

	* config.gcc: Remove host-specific stuff which is unused here
	since the introduction of config.host.

Index: config.gcc
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config.gcc,v
retrieving revision 1.352
diff -u -r1.352 config.gcc
--- config.gcc	1 Sep 2003 17:30:37 -0000	1.352
+++ config.gcc	1 Sep 2003 17:53:05 -0000
 <at>  <at>  -86,8 +86,6  <at>  <at> 
 #  extra_headers	List of used header files from the directory
 #			config/${cpu_type}.
 #
-#  host_xmake_file	List of host-specific makefile-fragments.
-#
 #  extra_passes		List of extra executables compiled for this target
 #			machine, used for compiling from source to object.
 #
 <at>  <at>  -96,14 +94,6  <at>  <at> 
 #
 #  extra_programs	Like extra_passes, but these are used when linking.
 #
-#  host_extra_objs	List of extra host-dependent objects that should
-#			be linked into the compiler proper.
-#
-#  host_extra_gcc_objs	List of extra host-dependent objects that should
-#			be linked into the gcc driver.
(Continue reading)

Nathanael Nerode | 1 Sep 2003 20:17
Picon

[PATCH] Remove non-functional --with-elf

I noticed that this code was effectively dead.  I'm going to wait for
a few days in case someone tells me that it's coming back before committing.

ELF isn't a debug format anyway, is it?...

	* configure.in: Remove --with-elf, which doesn't work.
	* configure: Regenerate.
	* config.gcc: Remove references to $elf, which does nothing.

Index: configure.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/configure.in,v
retrieving revision 1.722
diff -u -r1.722 configure.in
--- configure.in	1 Sep 2003 17:30:37 -0000	1.722
+++ configure.in	1 Sep 2003 18:14:44 -0000
 <at>  <at>  -460,12 +460,6  <at>  <at> 
 stabs="$with_stabs",
 stabs=no)

-# With ELF
-AC_ARG_WITH(elf,
-[  --with-elf              arrange to use ELF instead of host debug format],
-elf="$with_elf",
-elf=no)
-
 # Determine whether or not multilibs are enabled.
 AC_ARG_ENABLE(multilib,
 [  --enable-multilib       enable library support for multiple ABIs],
Index: config.gcc
(Continue reading)

Nathanael Nerode | 1 Sep 2003 20:48
Picon

[PATCH] Remove host-specific renaming of target_alias from config.gcc

Unless I'm confused, the target_alias renaming stuff is a workaround for
*host* filename limitations.  Now that this stuff is in config.host,
it doesn't need to be in config.gcc.

DJ, can you confirm this for DJGPP (which I'm less sure about than VMS)?

	* config.gcc: Remove host-specific rewrites of target_alias.

Index: config.gcc
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config.gcc,v
retrieving revision 1.353
diff -u -r1.353 config.gcc
--- config.gcc	1 Sep 2003 17:58:18 -0000	1.353
+++ config.gcc	1 Sep 2003 18:46:22 -0000
 <at>  <at>  -562,13 +562,6  <at>  <at> 
 	tm_file="${tm_file} alpha/vms.h alpha/vms64.h"
 	xm_file="alpha/xm-vms.h"
 	tmake_file="alpha/t-alpha alpha/t-vms alpha/t-vms64 alpha/t-ieee"
-	# This removes the cpu type and manufacturer components and
-	#  replaces "." with "_" in the operating system version.
-	case $host in *-*-*vms*)
-		target_alias=`echo $host \
-		  | sed 's/.*-.*-\(.*\)$/\1/' | sed 's/\./_/g'`
-		;;
-	esac
 	prefix=/gnu
 	local_prefix=/gnu
 	;;
 <at>  <at>  -576,13 +569,6  <at>  <at> 
(Continue reading)


Gmane