In http://gcc.gnu.org/ml/gcc/2006-07/msg00362.html, you wrote:
Are there any ideas on how and where to add a target and language independent code compaction pass into gcc?
I think first you should be more specific about what you are trying to do. DO you only want to match essentially identical functions? I suppose that shouldn't be that hard to do, you can compare the gimple trees after / instead of inlining, while keeping a translation table for variable names. But would that be worth while? Have you studied any code base to determin how much of a code size saving you could expect?