This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Where can I get the output of the front-end.
> * I can see the functions one by one, but is there a moment during the
> compilation at which we can see the whole program in one single
> tree ? (A kind of list of functions and declarations)
>
>From cgraphunit.c:
/* Analyze the whole compilation unit once it is parsed completely. */
void
cgraph_finalize_compilation_unit ()
>
> * I plugged myself just after the ssa optimizations by adding a
> function call. What I don't manage to do is to remove the
> backend ... (My modified code still generates RTL and assembler)
>
Define a global variable, say "rest_of_compilation_needed", that will
control the access to the back_end:
Index: c-decl.c
===================================================================
RCS file: /home/pop/cvsroot/gcc-cvs/gcc/gcc/c-decl.c,v
retrieving revision 1.334.2.41
diff -u -3 -p -c -r1.334.2.41 c-decl.c
*** c-decl.c 13 Mar 2003 22:24:24 -0000 1.334.2.41
--- c-decl.c 4 Apr 2003 18:50:04 -0000
*************** c_expand_body_1 (fndecl, nested_p)
*** 6630,6637 ****
input_filename = saved_input_filename;
lineno = saved_lineno;
! /* Run the optimizers and output the assembler code for this function. */
! rest_of_compilation (fndecl);
/* Undo the GC context switch. */
if (nested_p)
--- 6630,6638 ----
input_filename = saved_input_filename;
lineno = saved_lineno;
! if (rest_of_compilation_needed)
! /* Run the optimizers and output the assembler code for this function. */
! rest_of_compilation (fndecl);
/* Undo the GC context switch. */
if (nested_p)