This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: dragonegg in FSF gcc?


Hi Diego,

I agree with what you said. As a researcher I started using GCC instead of Open64 in 2005
after I saw some steps towards modularity when pass manager has been introduced since it
was really simplifying my life when working on iterative/collective compilation. We have
been also trying to propose further modularization/API-zation using plugins and interactive compilation
interface to provide more abstractions to GCC but the acceptance was far too slow (6+ years).

Up to now, LLVM is quite behind in terms of optimizations, but it's modularity simplifies
adding new optimization, instrumentation and analysis passes among other things. I still use or 
plan to GCC for many reasons but I also use LLVM and I see some of my colleagues 
moving from GCC to LLVM mainly due to modularity and simplicity-of-use reasons. I still sometimes hear 
comments that GCC shouldn't be driven at all by the needs of researchers but lots of advanced optimizations 
actually came from academic research, so I think this can be a bit short-sighted. If GCC will not move
towards modularization and clean APIs (by the way, I am not saying that it's easy), it doesn't mean that 
it will disappear, but it will change the role and will have to catch up. So, I think having 2 good 
open-source compilers and a healthy competition is not bad ;) ... We also heard many similar comments 
from our colleagues at GROW'09 and GROW'10 workshops...

Cheers,
Grigori



-----Original Message-----
From: gcc-owner@gcc.gnu.org [mailto:gcc-owner@gcc.gnu.org] On Behalf Of Diego Novillo
Sent: Tuesday, April 13, 2010 11:06 PM
To: Steven Bosscher
Cc: Jack Howarth; Paolo Bonzini; Dave Korn; Manuel LÃpez-IbÃÃez; Duncan Sands; gcc@gcc.gnu.org
Subject: Re: dragonegg in FSF gcc?

On Tue, Apr 13, 2010 at 16:51, Steven Bosscher <stevenb.gcc@gmail.com> wrote:

> You say you see benefits for both compilers. What benefits do you see
> for GCC then, if I may ask? And what can GCC take from LLVM? (And I
> mean the FSF GCC, long term.) This is an honest question, because I
> personally really don't see any benefit for GCC.

If comparisons between the two compilers are easy to make, then it's
easy to determine what one compiler is doing better than the other and
do the necessary port.

In terms of internal structure, LLVM is more modular, which simplifies
maintenance (e.g., the automatic bug finder, unit tests).  The various
components of the pipeline have better separation and stronger APIs.
GCC has been slowly moving in that direction, but it still have ways
to go.  LLVM has already proven that organizing the compiler that way
is advantageous (additionally, other research compilers were
structured similarly: Sage++, SUIF), so emulating that structure
sounds like a reasonable approach.

Another example where GCC may want to operate with LLVM is in JIT
compilation.  Clearly, LLVM has made a significant investment in this
area.  If GCC were to generate LLVM IR, it could just use all the JIT
machinery without having to replicate it.

There may be other things GCC could take advantage of.

OTOH, GCC has optimizer and codegen features that LLVM may want to
incorporate.  I don't have specific examples, since I am not very
familiar with LLVM.


Diego.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]