Split out RTL reader
Zack Weinberg
zackw@Stanford.EDU
Tue Jun 26 11:17:00 GMT 2001
On Tue, Jun 26, 2001 at 07:00:41PM +0100, Joseph S. Myers wrote:
> On Tue, 26 Jun 2001, Zack Weinberg wrote:
>
> > * rtl.c: Split RTL reader (read_rtx, read_skip_spaces,
> > traverse_md_constants, fatal_with_file_and_line,
> > fatal_expected_char, read_name, read_string, def_hash,
> > def_name_eq_p, read_constants, and related data) to its own
> > file. Weed out now-unnecessary #includes.
> > * read-rtl.c: New file.
> > * Makefile.in (HOST_RTL): Add read-rtl.o.
> > (read-rtl.o): New rule.
> > (rtl.o, $(HOST_PREFIX_1)rtl.o): Update dependencies.
>
> The documentation of passes and files of the compiler in gcc.texi should
> be updated.
How's this?
zw
* doc/gcc.texi (Passes): Talk briefly about the support
library used by genfoo.
* doc/rtl.texi (Reading RTL): read_rtx is not available in the
compiler itself.
===================================================================
Index: doc/gcc.texi
--- doc/gcc.texi 2001/06/25 00:21:28 1.16
+++ doc/gcc.texi 2001/06/26 18:16:13
@@ -3719,10 +3719,14 @@ Several passes use @file{real.h}, which
representation of floating point constants and how to operate on them.
@item
-All the passes that work with RTL use the header files @file{rtl.h}
-and @file{rtl.def}, and subroutines in file @file{rtl.c}. The tools
-@code{gen*} also use these files to read and work with the machine
-description RTL.
+All the passes that work with RTL use the header files @file{rtl.h} and
+@file{rtl.def}, and subroutines in file @file{rtl.c}. The tools
+@code{gen*} also use these files to work with the machine description
+RTL.
+
+@item
+All the tools that read the machine description use support routines
+found in @file{gensupport.c}, @file{errors.c}, and @file{read-rtl.c}.
@findex genconfig
@item
===================================================================
Index: doc/rtl.texi
--- doc/rtl.texi 2001/06/25 00:21:28 1.9
+++ doc/rtl.texi 2001/06/26 18:16:14
@@ -3182,11 +3182,10 @@ combiner is finished with the insn. Thi
@section Reading RTL
To read an RTL object from a file, call @code{read_rtx}. It takes one
-argument, a stdio stream, and returns a single RTL object.
-
-Reading RTL from a file is very slow. This is not currently a
-problem since reading RTL occurs only as part of building the
-compiler.
+argument, a stdio stream, and returns a single RTL object. This routine
+is defined in @file{read-rtl.c}. It is not available in the compiler
+itself, only the various programs that generate the compiler back end
+from the machine description.
People frequently have the idea of using RTL stored as text in a file as
an interface between a language front end and the bulk of GCC. This
More information about the Gcc-patches
mailing list