gcc, conceptgcc, and llvm-gcc

Hey all,

My previous work was done mainly in the front-end of conceptgcc,
whereas recently I am doing some code analysis in the middle-end of
llvm. I am considering to port my previous work to llvm.

So, I am very concerned with the difference between gcc and llvm-gcc,
and of course the difference between gcc and conceptgcc. I have no
idea of the former difference, though I have some idea of the latter
difference.

Would someone briefly please point out the changes of llvm-gcc
relative to gcc? Hopefully, with your input, I could evaluate the
efforts when I patch a normal gcc with the differences between gcc and
llvm-gcc :slight_smile:

Thanks!

Best,
Xiaolong

Hi Xiaolong,

Your question doesn't have a simple answer. :slight_smile:

The differences between gcc and llvm-gcc are fairly substantial. There's the obvious point that instead of the gcc optimizers and code generators, llvm-gcc uses llvm's optimizers and code generators. In fact, llvm-gcc tries to use as little of gcc's code as possible (for instance, the code is never converted to RTL). Using only enough to parse the code and then translate it into llvm IR. (See the various llvm-* files in the llvm-gcc source tree.)

If you're wishing to port your work to llvm, might I suggest looking into clang?

  http://clang.llvm.org/

-bw

Hi Xiaolong,

My previous work was done mainly in the front-end of conceptgcc,
whereas recently I am doing some code analysis in the middle-end of
llvm. I am considering to port my previous work to llvm.

So, I am very concerned with the difference between gcc and llvm-gcc,
and of course the difference between gcc and conceptgcc. I have no
idea of the former difference, though I have some idea of the latter
difference.

I don't think llvm-gcc is interesting for you. I think you would do better
to work on the clang front-end. It seems to me that llvm-gcc is being
abandoned, and everyone is migrating either to clang (for C/C++/ObjC) or
dragonegg (for Fortran/Ada etc).

Would someone briefly please point out the changes of llvm-gcc
relative to gcc? Hopefully, with your input, I could evaluate the
efforts when I patch a normal gcc with the differences between gcc and
llvm-gcc :slight_smile:

The differences are big, and you will feel a lot of pain if you try to
apply them to a gcc more recent than gcc-4.2. On the other hand, the
dragonegg project (http://http://dragonegg.llvm.org/) already ported
llvm-gcc to gcc-4.5, and while it still requires patching gcc, the patch
is tiny and trivial.

Ciao,

Duncan.

Hi Xiaolong,

My previous work was done mainly in the front-end of conceptgcc,
whereas recently I am doing some code analysis in the middle-end of
llvm. I am considering to port my previous work to llvm.

So, I am very concerned with the difference between gcc and llvm-gcc,
and of course the difference between gcc and conceptgcc. I have no
idea of the former difference, though I have some idea of the latter
difference.

I don't think llvm-gcc is interesting for you. I think you would do better
to work on the clang front-end. It seems to me that llvm-gcc is being
abandoned, and everyone is migrating either to clang (for C/C++/ObjC) or
dragonegg (for Fortran/Ada etc).

Agreed. Both conceptgcc and llvm-gcc are evolutionary dead ends. That said, if this is a research project that need not have a long life, merging the two is plausible: both are based on gcc 4.2, and conceptgcc touches on different parts of the frontend than llvm-gcc. Merging would take far less time than trying to reinplement concepts :slight_smile:

  - Doug