Hello Flint,

On Sat, Jan 28 2023, hmsjwzb via Gcc wrote:
> Hi GCC developers,
>
>       I am learning GCC. But the GCC code is hard to understand.

We are delighted you found looking into GCC interesting.  I definitely
agree that GCC source can be hard to read, especially for newcomers but
often even for seasoned contributors when they look at a part they are
not familiar with.  But when you manage to manage to overcome the
difficulty, the project can be very rewarding.  And so not hesitate to
ask us any specific question you may have here on the mailing list or on
IRC.

>       I'm reading the c compiler of GCC. It seems the understanding of
>       AST/GENERIC representation is very important. Is there a tool
>       can visualize the AST/GENERIC representation?

Intermediate representations like GENERIC, GIMPLE and RTL are indeed
fundamental.  In order to see the representation of instructions,
compile a simple program with option -fdump-tree-all and examine the
many files that will appear in your working directory (representation of
things like aggregate data types is unfortunately somewhat missing).

>
>       Do you have some advice for GCC beginner? Is there some documentations 
> can help in the learning of GCC?

David Malcolm wrote a very nice set of tutorials about various aspects
of starting with GCC:
https://gcc-newbies-guide.readthedocs.io/en/latest/

I believe that is the best generic resource there is.

Good luck,

Martin

Reply via email to