On Wed, Mar 23, 2011 at 12:38, Jan Hubicka <hubi...@ucw.cz> wrote: >> think it would be much easier if you worked with a copy (ugh, >> streaming trees again....). > > I also think using same machinery for FE/gimple is a mistake. Trees are > making > life hard since they are interface in between FE<->gimplifier, part of gimple, > interface for RTL expansion and way we represent debug info.
Yes, but this is only part of the common machinery. I'm actually more interested in the other functionality. Keeping string tables, symbol tables, file sections, ability to stream shared pointers by creating references, etc. As gimple gets rid of trees, we can transition that code into the front end. The common code that remains, we can add hooks so each user implements its own functionality. > Those are not neccesarily related things and tying them together makes > things harder to optimize & cleanup. No, that's not the intent. I simply want to re-use common code. We will have streamers for debug info, and passes have their own streamers. PPH is adding another streamer in the front end. All I'm looking for is to have a set of common streaming code I can use. > I would rather see well define Gimple bitcode rather than designing common > format to handle PCHs, LTO and external templates on the top of existing > trees. In as much as gimple is still using tree codes, those would remain in common code. As gimple gets rid of trees, we handle those in the front end. So, I don't think that will be a problem. Diego.