This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GCC Front-End Questions

On 12/08/2015 12:32 PM, Jodi A. Miller wrote:
Good Afternoon,

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?
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.

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 C++ front-end.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]