Gabriel Dos Reis wrote:
I have been able to build similar tool for at least two radically
different C++ front ends -- one being proprietary, the other one
being GCC (the most painful to work with). We call the representation
`IPR' (for Internal Program Representation). The interface is
completely compiler neutral. I haven't tested it myself on another
important proprietary compiler but from feedback people we talked
with, we should not worry. Yes, that is not an ISO-approved thing,
but just a data point something `vaguely equivalent to this in the
general g++' context has been done. We have not released IPR yet, but
it be open source a fairly open license.
It would be great if this could be the basis for an ASIS-similar
standard for C++, even if it is only a de factor semi-standard :-)
| On the other hand, if your mission is to plug in an extra optimization
| pass, ASIS won't help since it is strictly a read-only interface with
| no provision for feeding back information to the compiler.
IPR doesn't attempt to replace compiler internal data structures for
writing optimizations. Nor it is a plugin into GIMPLE or RTL -- as I
said, it is designed to be compiler neutral.
-- Gaby