Hi, we're currently developing an experimental back-end for a very irregular DSP architecture violating very basic assumptions of the gcc back-end. In order to have the option to switch the front-end for experimental reasons and to have a clear interface to gcc, we chose to decouple the back-end and use XML as an intermediate language.
I just finished an initial implementation for XML tree dumps for the 4.1 branch that preserves the internal tree structure quite well and might be of general interest. The patch itself and a small sample are available at http://www.complang.tuwien.ac.at/cd/ebner/xmldump Given the strong tool support for XML and XSL, this might serve as an excellent debugging utility. Furthermore, it might be useful to other tools relying on the semantics of programs. The intention of this posting is to ask for suggestions and to see if it is of interest to integrate a dump format like this in gcc. The representation is not yet as compact as I'd like to have it and the current implementation ignores annotations such as alias information. However, the intention should be clear. Cheers, - Dietmar PS: I didn't find a way to have manually malloc'ed memory point to garbage collected trees, so I put my whole data structure under ggc control. I would be grateful if somebody wants to have a look at it since I'm not fully convinced of the correctness of my implementation - although it seems to work. --------------------------------------------------------------------- Dietmar Ebner CD Laboratory - Compilation Techniques for Embedded Processors Institut fuer Computersprachen E: [EMAIL PROTECTED] Technische Universitaet Wien T: (+431) 58801-18598 Argentinierstrasse 8 / E1851 F: (+431) 58801-58521 1040 Wien, Austria W: www.complang.tuwien.ac.at/cd/ebner