]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/doc/gccint/rtl-representation/reading-rtl.rst
sphinx: add missing trailing newline
[thirdparty/gcc.git] / gcc / doc / gccint / rtl-representation / reading-rtl.rst
1 ..
2 Copyright 1988-2022 Free Software Foundation, Inc.
3 This is part of the GCC manual.
4 For copying conditions, see the copyright.rst file.
5
6 .. _reading-rtl:
7
8 Reading RTL
9 ***********
10
11 To read an RTL object from a file, call ``read_rtx``. It takes one
12 argument, a stdio stream, and returns a single RTL object. This routine
13 is defined in :samp:`read-rtl.cc`. It is not available in the compiler
14 itself, only the various programs that generate the compiler back end
15 from the machine description.
16
17 People frequently have the idea of using RTL stored as text in a file as
18 an interface between a language front end and the bulk of GCC. This
19 idea is not feasible.
20
21 GCC was designed to use RTL internally only. Correct RTL for a given
22 program is very dependent on the particular target machine. And the RTL
23 does not contain all the information about the program.
24
25 The proper way to interface GCC to a new language front end is with
26 the 'tree' data structure, described in the files :samp:`tree.h` and
27 :samp:`tree.def`. The documentation for this structure (see :ref:`generic`)
28 is incomplete.