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: gcc-backend query..


>[1] from the gcc-sources It is found that the back-end IR [AST] can be
>used for per-function RTL conversion....

Yes.  Some front ends parse an entire function at a time into trees (AST),
and then convert the entire function trees into RTL.  Some older ones parse
one statement and a time and then convert one statement at a time into RTL.

>[2]Is there any way,to gurantee and proceed that these RTL codes
>[generated-per-function],can give rise to an executable / object code..??

I am not sure what you are asking, since gcc isn't going to generate RTL for
a function unless it is planning on emitting object code.  If you emit RTL
into a function, it will end up in the object code.  If you want to create
your own functions, then you need to use a different set of interfaces.

>{ there are files final.c and other's but the functions are not much
>clear...}

Probably the clearest way to understand what cc1 is doing is to step through
it in gdb while compiling a trivial testcase.  The functions in final.c only
do the final conversion from RTL to assembly language.  Try looking at
rest_of_compilation and in the C front end c_expand_body.

Jim


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