This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: query about Gcc-backend..
- From: Jim Wilson <wilson at redhat dot com>
- To: "Avinash J.K. Shrivastava" <avi at cse dot iitb dot ac dot in>
- Cc: gcc at gnu dot org, naveens at noida dot hcltech dot com
- Date: 02 Oct 2002 17:11:46 -0400
- Subject: Re: query about Gcc-backend..
- References: <Pine.HPX.4.21.0210022328090.19898-100000@everest.cse.iitb.ac.in>
>[1] what is the way [mechanism] the backend of gcc accepts and handles the
> tree-representation....
Pass a tree to expand_expr, and it emits RTL into the current instruction
stream. expand_expr is in expr.c.
>[2] how exactly is done "the tree-RTL conversion"...
The md file is required to have certain named patterns which implement the
minimal set of operations from which all other operations can be derived.
For each tree code, there is one or more RTL generation strategies. The
strategies generally involve calling named patterns in the md file. If
there is more than one RTL generation strategy, then we use info from the
backend to decide which strategy to use. This can involve checking to see
which named patterns are defined by this target. This can involve comparing
relative costs of operations to determine which strategy is cheaper. Etc.
>[3] how can we understand the broad-view of the routine(s), in the
> file(s).
There is some info in the internals documentation. See for instance
http://gcc.gnu.org/onlinedocs/gccint/Passes.html#Passes
For a better understanding, you just have to spend some time studying the
gcc sources.
Jim