> > GVM, TU combination and all the associated slimming down of our IR > data > structures will be quite a bit of work. This is also needed for > other > projects >
I believe it is more work than porting improvements to LLVM and making LLVM usable. Significantly more work. > > We would keep a fully functional compiler throughout. Rewiring > internal > data structures and code to make them smaller/nimbler can be easily > tested > by making sure we can still build the world. > The only way to keep a fully functioning compiler throughout is to have massive patches. I highly doubt you can rewrite all the optimizers to not use tree, be safe about types, etc, without breaking anything or without massive patches. It's just not going to work. > > The initial impression I get is that LLVM involves starting from > scratch. > I don't quite agree that this is necessary. One of the engineering > challenges we need to tackle is the requirement of keeping a fully > functional compiler *while* we improve its architecture. > > I take the absolute opposite view, in that I believe *not using LLVM* is starting from scratch. You kinda gloss over the real work that will be required to modify and implement all our data structure changes. For example: What makes you think we will be very successful at reducing memory usage of our data structures without major changes, when we *never have been able to do this well before*? Why should we take a gamble at implementing the things we suck at, when LLVM does them well, and we'd only need to implement the things we've done right before? > > With our limited resources, we cannot really afford to go off on a > multi-year tangent nurturing and growing a new technology just to add > a > new feature. > What makes you think implementing LTO from scratch is different here? > Another minor nit is performance. Judging by SPEC, LLVM has some > performance problems. It's very good for floating point (a 9% advantage > over GCC), but GCC has a 24% advantage over LLVM 1.2 in integer code. I'm > sure that is fixable and I only have data for an old release of LLVM Uh, you are comparing 4 releases ago of LLVM, against the current release of gcc, and saying "It doesn't do as well". GCC 3.2 wasn't that good at SPEC either :) As for the rest, i'm sure Chris will respond, but 1. It has been used outside research environments, and in fact, Apple is moving to use it as their middle end. 2. It natively supports Alpha, Sparc, IA64, X86, and PowerPC. An LLVM->RTL converter is not that hard, which simply removes the entire argument anyway. The bottom line I just don't see any sane argument for redo'ing what others have done very well, unless using that will require more resources than doing it from scratch. I can't honestly believe that the work required to make LLVM usable for us is anywhere near the work we are going to need to tree-ssa to do the same things LLVM does. --Dan