This is the mail archive of the
mailing list for the GCC project.
Re: After GIMPLE...
"Paulo J. Matos" <email@example.com> 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.
> 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.