On 29 Jan 2007 11:38:15 -0800, Ian Lance Taylor <[EMAIL PROTECTED]> wrote:
"Paulo J. Matos" <[EMAIL PROTECTED]> 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