This is the mail archive of the
mailing list for the GCC project.
Re: GCC Front-End Questions
- From: Jeff Law <law at redhat dot com>
- To: "Jodi A. Miller" <jas31 at arl dot psu dot edu>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Tue, 8 Dec 2015 12:56:35 -0700
- Subject: Re: GCC Front-End Questions
- Authentication-results: sourceware.org; auth=none
- References: <330CAF8A870FFB478CF058205D2A809136E92F64 at exchange7 dot arl dot psu dot edu>
On 12/08/2015 12:32 PM, Jodi A. Miller wrote:
Front-ends do a fair amount of folding, distribution & reassociation
(see fold-const.c). We are currently working to delay folding until the
optimization pipeline starts.
My colleagues and I are doing a study on compilers. We have some
questions related to gcc and the compilation process that we were
hoping you could help us with.
In a general sense, we were wondering what optimizations may be
occurring in the front-end stages of the compiler? We are noticing
some constant substitution (e.g., 2*15+3 being changed to 33) and
some algebraic simplifications (more later) showing up in the first
intermediate file generated using dump flags with the g++ command.
Are we correct in assuming this first IR file is indeed coming from
the front end (.original file)? In looking at the gcc source code,
we are having difficulty seeing where these optimizations might be
occurring in the initial parsing phase. Do you have any insights you
might be able to share?
Essentially the guiding principle of that work is that the initial
gimple code ought to closely match the input source.
The first batch of work to delay folding will show up in gcc-6 for the