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]

GCC questions



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.





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