[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-sparse
Subject:    Re: printf("hello world")
From:       Chris Lattner <sabre () nondot ! org>
Date:       2004-07-08 6:58:48
Message-ID: Pine.LNX.4.44.0407080146470.21917-100000 () nondot ! org
[Download RAW message or body]

On Wed, 7 Jul 2004, Linus Torvalds wrote:
> On Wed, 7 Jul 2004, Chris Lattner wrote:
> >
> > Can you give more detail about why you don't ever see sparse integrating
> > with LLVM?  They seem to be such a perfect match on all levels.  Is it
> > just that Sparse is intended more as a checker tool than as an end-to-end
> > compiler?
>
> I would love to have a back-end, and I don't personally much care _what_
> back-end, as one of my main reasons for wanting a back-end at all is just
> verification.

Understood.

> The front-end does a fairly good job these days, but the fact is that it
> hasn't really been _tested_ on anything than the checker thing, which
> means that while I know the types are "roughly" correct, I also bet there
> are a ton of silly bugs in the details that arise from just the simple
> fact that the checker part doesn't care that deeply about types.

I agree.  From my perspective, running the code through a backend and
being able to actually execute the compiled code seems like the only real
way to do end-to-end testing of the front-end.  It certainly makes finding
test cases simpler. :)

> Being able to compile a real program would probably find a _lot_ of small
> bugs in the front-end, and as such I'd love to have even a stupid
> back-end.

Agreed.

> > Anyway, I'm just curious what is in store for the future of Sparse.  Is it
> > to become a full fledged compiler?  If not, why is the continuing
> > optimization/codegen work?
>
> One of the things I feel strongly about is the fact that it's really a
> front-end, and try to keep the back-end somewhat separate (possibly a
> separate project altogether, but even if it's integrated into the sparse
> source tree, I'd like to put it in a separate subdirectory etc).

That makes an incredible amount of sense, and that's what I like about
Sparse: it's the exact same design as we are using for LLVM.  LLVM is a
very modular system, where all of the optimizations are indepedent of each
other and which are independent from all of the backends.  This is a very
important design goal of LLVM and runs deeply through it.

> And yes, I'd love to eventually make sparse a real compiler. It's not the
> primary objective, but it wouldn't hurt to have more free compilers out
> there.

I think that you are definitely understating the value of a solid and fast
replacement for GCC.  End users are clearly fed up with many of the
fundamental design decisions made in GCC and the GCC developers show
little interest in changing them.

From what I understand about Sparse (which is very little mind you :) ) it
is aimed at being a very efficient and light-weight C front-end... only!
You don't aim it to be the uber-integrated-entangled-monster that GCC has
grown into.

Couple this to an extremely efficient optimizer and code generator (LLVM)
with a huge list of features (like transparent link-time interprocedural
optimization, if you want to use it), and I think that it would be an
incredibly valuable open-source compiler.

In any case, if anyone is interested in this (perhaps the other Chris L?
:) ), I would be happy to help in a secondary role.

-Chris

-- 
http://llvm.org/
http://www.nondot.org/~sabre/Projects/



-
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic