Middle End Comparison:GCC VS LLVM

Hi,
I have digged into the middle end of both LLVM and GCC a while.And I always try to compare them from the view of data structure anr algorithm.I want the opinions of you experts.Can you guy talk about this?To be precise, I want to compare the design of the tree(GCC) and IR,and the design of the RTL(GCC) and (DAG and Machine Instructions). I want to know what is the advantages and disadvantages these design have brought in,what kind of the troubles they have made,and hiw they solve.

lin zuojian

Hi,

You're probably looking for a book or two's worth of material, not a
thread on a mailing list.

The best way I know how to learn something new is to write about it,
and get as many people as possible to tell how wrong you are.
Unfortunately, the LangRef has nothing about the design decisions (nor
should it), which I believe could be added as a separate document, or
even as multiple blog posts on a blog you own, or better still, add it
to Wikipedia, as that area seems very bleak at the moment.

It's also good to have in mind that the original design for something
is never fully accomplished, and multiple side goals become more
important, deviating the path, and the goals. So, what LLVM IR, DAG,
MC, MI was 5 years ago is not the same as today. The same is true on
GCC, for instance when they added the tree-SSA format to cope the
problems in the original design.

You seem to know enough about the differences to start something.
First, describe what you know about them, then infer about their
designs, and then prepare for public bashing and updating your docs,
rinse, repeat. It's a lot more productive if you tell us what you
think, and we discuss, rather than asking for lectures on compiler
design.

cheers,
--renato