GCC3.5 tree-ssa

hi,

what difference is between gcc3.5 tree-ssa and llvm?

yueqiang

2003/12/24

They are completely different projects. The short version is that LLVM is
more mature and stable than tree-ssa is, LLVM supports interprocedural and
runtime optimization, and LLVM has a well defined intermediate
representation with a textual format. On the other hand tree-ssa may be a
part of GCC 3.5 someday once it has stabilized and enough bugs have been
fixed. Oh, LLVM is written in C++ and tree-ssa is written in C.

If there is something more specific you want to know, please ask. It's
very much the difference between apples and oranges.

-Chris

why doesn't llvm transfer bytecode to RTL form?
I mean the cross-platform compile in GCC.

Could LLVM do that?

maybe tree-ssa also create the representation with a testual format if needed.
is it very difficalt?
I want to know.

BWT:
if we port pthread library to llvm, what do we consider at first?

yueqiang

Chris Lattner wrote:

why doesn't llvm transfer bytecode to RTL form? I mean the
cross-platform compile in GCC. Could LLVM do that?

Sure, it would be a realtively straight-forward (but large and hard to get
right, if you're not a GCC expert), project to build an LLVM front-end for
GCC. This would allow you to effectively use LLVM as a mid-level
representation for GCC, and would allow you to use all of the GCC
back-ends with LLVM.

However, note that LLVM already does have a C backend, which allows you to
interface the LLVM optimizer to GCC or any other platform compiler. This
effectively gives you most of the advantages of a real "RTL backend", with
the added advantage that we support the Intel, Sun, SGI, etc compilers as
well (at least in theory, we have only tried compiling the CBE output with
the GCC and Intel compilers). Also "C" is a very stable interface
language, where the RTL interfaces and APIs are constantly changing. The
one advantage an RTL backend would have over the C backend is speed of
compilation.

maybe tree-ssa also create the representation with a testual format if
needed. is it very difficalt? I want to know.

There are _very strong_ political reasons that will prevent this from
happening any time in the near future. I suggest that you ask on the GCC
list if you want more details. All tree-ssa supports are some debugging
dumps, which do not contain all of the information needed for compilation.

BWT: if we port pthread library to llvm, what do we consider at first?

I'm not sure exactly what you mean. If it's written in C, you should be
able to just compile it with LLVM as you would any other program or
library. Have you run into a problem or bug?

-Chris

Chris Lattner wrote:

>
>
>>what difference is between gcc3.5 tree-ssa and llvm?
>>
>>
>
>They are completely different projects. The short version is that LLVM is
>more mature and stable than tree-ssa is, LLVM supports interprocedural and
>runtime optimization, and LLVM has a well defined intermediate
>representation with a textual format. On the other hand tree-ssa may be a
>part of GCC 3.5 someday once it has stabilized and enough bugs have been
>fixed. Oh, LLVM is written in C++ and tree-ssa is written in C.
>
>If there is something more specific you want to know, please ask. It's
>very much the difference between apples and oranges.
>
>-Chris
>
>
>

-Chris

we work on distribute software development, most programs are wroten in java.
but the running speed of that is slowly, it requires thread library to support, you know.

Chris Lattner wrote:

we work on distribute software development, most programs are wroten in
java.
but the running speed of that is slowly, it requires thread library to
support, you know.

I'm not sure exactly what you mean here. LLVM does not currently have a
Java front-end, though there is one in development. Thread support should
not be a problem, you can make pthreads calls just like you can with any
other compiler.

I'm probably missing your point, can you restate it?

-Chris

Does LLVM called the pthread directly?
and what time do you plan to release Java front end?

I'll try this.

Does LLVM called the pthread directly?

LLVM does not insert any calls to pthreads libraries. If the source code
for the program being compiled calls a pthread function, then LLVM will
compile it to call the specified function. If you call 'pthread_create'
in your program, for example, the LLVM bytecode file will contain an
external function call to pthread_create, which will require you to link
to the system pthreads library (or libc if it includes pthreads support).

and what time do you plan to release Java front end?

There are no firm plans at this point, it is still under fairly early
development.

-Chris

I'll try this.

From: "Chris Lattner" <sabre@nondot.org>
To: "yue" <qiangyue@ict.ac.cn>
Cc: <llvmdev@cs.uiuc.edu>
Sent: Wednesday, December 24, 2003 12:47 PM
Subject: Re: [LLVMdev] GCC3.5 tree-ssa

>
> > we work on distribute software development, most programs are wroten in
> > java.
> > but the running speed of that is slowly, it requires thread library to
> > support, you know.
>
> I'm not sure exactly what you mean here. LLVM does not currently have a
> Java front-end, though there is one in development. Thread support should
> not be a problem, you can make pthreads calls just like you can with any
> other compiler.
>
> I'm probably missing your point, can you restate it?
>
> -Chris
>
> > >
> > >
> > >
> > >>why doesn't llvm transfer bytecode to RTL form? I mean the
> > >>cross-platform compile in GCC. Could LLVM do that?
> > >>
> > >>
> > >
> > >Sure, it would be a realtively straight-forward (but large and hard to get
> > >right, if you're not a GCC expert), project to build an LLVM front-end for
> > >GCC. This would allow you to effectively use LLVM as a mid-level
> > >representation for GCC, and would allow you to use all of the GCC
> > >back-ends with LLVM.
> > >
> > >However, note that LLVM already does have a C backend, which allows you to
> > >interface the LLVM optimizer to GCC or any other platform compiler. This
> > >effectively gives you most of the advantages of a real "RTL backend", with
> > >the added advantage that we support the Intel, Sun, SGI, etc compilers as
> > >well (at least in theory, we have only tried compiling the CBE output with
> > >the GCC and Intel compilers). Also "C" is a very stable interface
> > >language, where the RTL interfaces and APIs are constantly changing. The
> > >one advantage an RTL backend would have over the C backend is speed of
> > >compilation.
> > >
> > >
> > >
> > >>maybe tree-ssa also create the representation with a testual format if
> > >>needed. is it very difficalt? I want to know.
> > >>
> > >>
> > >
> > >There are _very strong_ political reasons that will prevent this from
> > >happening any time in the near future. I suggest that you ask on the GCC
> > >list if you want more details. All tree-ssa supports are some debugging
> > >dumps, which do not contain all of the information needed for compilation.
> > >
> > >
> > >
> > >>BWT: if we port pthread library to llvm, what do we consider at first?
> > >>
> > >>
> > >
> > >I'm not sure exactly what you mean. If it's written in C, you should be
> > >able to just compile it with LLVM as you would any other program or
> > >library. Have you run into a problem or bug?
> > >
> > >-Chris
> > >
> > >
> > >
> > >
> > >>Chris Lattner wrote:
> > >>
> > >>
> > >>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>>what difference is between gcc3.5 tree-ssa and llvm?
> > >>>>
> > >>>>
> > >>>>
> > >>>>
> > >>>They are completely different projects. The short version is that LLVM is
> > >>>more mature and stable than tree-ssa is, LLVM supports interprocedural and
> > >>>runtime optimization, and LLVM has a well defined intermediate
> > >>>representation with a textual format. On the other hand tree-ssa may be a
> > >>>part of GCC 3.5 someday once it has stabilized and enough bugs have been
> > >>>fixed. Oh, LLVM is written in C++ and tree-ssa is written in C.
> > >>>
> > >>>If there is something more specific you want to know, please ask. It's
> > >>>very much the difference between apples and oranges.
> > >>>
> > >>>-Chris
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>
> > >>
> > >
> > >-Chris
> > >
> > >
> > >
> >
> >
>
> -Chris
>
> --
> http://llvm.cs.uiuc.edu/
> http://www.nondot.org/~sabre/Projects/
>
>

-Chris