I chatted briefly with Ken today about the reader/writer being implemented for LTO. One of the difficulties in keeping the reader/writer up-to-date is the evolving IL data structures. Whenever these change, the reader must be adapted to the new format.
So, while the reader/writer is fairly straightforward and mechanical, it's a pain to have to keep changing it as new IL elements are added, or existing ones are modified. The idea, then, is to have the IL data structures defined in http://gcc.gnu.org/wiki/tuples to be in a .h file auto-generated from some template. I'm slightly tempted to consider that this would be too much abstraction, but we do change the IL from time to time and according to Ken, changing the reader/writer is somewhat of a pain. Given that we already have other autogenerated .h/.c files, I guess we could use some of the existing functionality. But, first, I'd like to know what folks think about this. Would it be generally useful for us to have the IL data structures auto-generated this way? I can see the benefits in the reader/writer. But also, we are going to have to re-implement the reader/writer when we move GIMPLE out of the tree data structures. OTOH, we will probably change them, add new codes and having them autogenerated may have other advantages. Thoughts? Thanks.