[LLVMdev] libFirm library

Roman Levenstein romixlev at yahoo.com
Mon Dec 1 15:26:39 PST 2008


Hi,

The libFirm library ( http://www.info.uni-karlsruhe.de/software/libfirm/index.php?title=Main_Page ) is GPLed some time ago.
libFirm is a library that provides an intermediate representation and optimizations for compilers. 
Programs are represented in a graph based SSA form. Several targets are supported, especially the x86.

Many optimizations are very similar to those of LLVM. But there are also some differences. 
This is what I could find out by quickly looking at the source code:
- It seems to have a different register allocator that works directly on the SSA form and performs chordal graph register allocation. 
  This is implemented by Sebastian Hack who is one of the pioneers working on the register allocation by means of chordal graph coloring.

- libFirm seems to have more advanced spilling and coalescing heuristics

- libFirm contains the implementation of the very fast liveness analysis based on the dominance information. 
  There was a discussion on this mailing list about including this algorithm into LLVM recently, if I remember correctly.

There is a discussion about libFirm on the FreeBSD mailing lists:
http://groups.google.co.kr/group/mailing.freebsd.hackers/browse_thread/thread/9dd9b232a5ab6a52

Apparently, people have asked how it compares to LLVM, both architecturally and performance-wise. 
And there are some replies from the libFirm developers in the thread mentioned above. 
BTW, on the project page there are some SPEC2000 performance comparisons with GCC, LLVM-GCC and Intel  Compilers.
It would be interesting to hear an opinion regarding those issues from the LLVM developers as well, I guess. 
Anyone willing to comment?

In any case, this library contains a lot of interesting and related things and worse looking at it and investigating a bit deeper what it is and what it provides.
May be some ideas could be interesting and beneficial for LLVM.

Any opinions about it?

-Roman



      




More information about the llvm-dev mailing list