This is the mail archive of the gcc@gcc.gnu.org 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: After GIMPLE...


On 29 Jan 2007 11:38:15 -0800, Ian Lance Taylor <iant@google.com> wrote:
"Paulo J. Matos" <pocm@soton.ac.uk> writes:

> I've been looking into the gcc sources and I'm somewhat confused.
> Are gcc/g++ comepletely independent programs or do they share a backend?

In the source code, they share a backend.  As executables, they are
different programs: cc1 and cc1plus.


OK, thanks, that was the idea I got from looking at the code.


> This question comes from the fact that I was trying to find a point in
> the source where I could get the GIMPLE tree and do with it what ever
> I wished to, without modifying too many files but it seems that gcc,
> g++ and other frontends have different program flows and only share
> some data structures and backend sources. So probably I need to
> eliminate the backend call in every frontend and after GIMPLE is
> created call my own functions which get the GIMPLE tree  and then
> compile my files against every frontend. Right?

I don't see why you would have to modify any code in the frontend.
You would modify the middle-end code.  Rebuilding the compiler would
rebuild cc1, cc1plus, etc.


You're right... middle-end code... that's what I need to change, not frontend. I keep forgetting some concepts and vocabulary!

Thank you,

Paulo Matos

Ian



--
Paulo Jorge Matos - pocm at soton.ac.uk
http://www.personal.soton.ac.uk/pocm
PhD Student @ ECS
University of Southampton, UK


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