This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
GCC questions
- To: gcc at gcc dot gnu dot org
- Subject: GCC questions
- From: Radu Cornea <radu at ics dot uci dot edu>
- Date: Tue, 3 Aug 1999 16:57:50 -0700 (PDT)
Hi!
I am currently working at a project that uses gcc. Therefore, I am trying to
understand how the rtx statements and trees are handled and how the code is
generated.
I have the following questions:
1. Is there a function to convert a tree representation to the equivalent
rtx?
2. What functions are available for debugging (like printing the tree or
rtx)?
3. How can a code portion (a tree) be duplicated (this includes the creation
of rtx and code generation)?
4. How can the last tree created be accessed?
5. I am asking these questions because I need to solve this problem in gcc:
in some cases, gcc transforms initial structured code into unstructured
code. This happens for example for if statements that have as condition
logical OR (||) or AND (&&) expressions. In order to generate structured
code, the then-statement have to be duplicated (as many times as the number
of ORs or ANDs). For this, i need to save somehow the then-statement tree
when it is generated and duplicate it (and of course, the jumps need to be
changed).
If anyone can help me on this I would be very grateful.
Thanks,
Radu Cornea.