December 14, 2008
Jarrett Billingsley wrote:
> Walter is the only one who can make DMD faster, and I think his time
> is much better spent on designing and maintaining the language.  The
> reference compiler is just supposed to be _correct_, not necessarily
> _fast_.  If Walter spent all his time working on making the the DMDFE
> optimizer better and making DMD backend produce faster code, he
> wouldn't have time to work on the language anymore, and it would be
> duplicated effort since GDC and LDC already do it better.

I haven't worked on the code generator / optimizer, other than fixing bugs, since about 1995. While there are obviously specific cases where it could do better, overall it still does a good job. In fact, for a while it was #1 on the Shootout aggregate benchmark results.

By "good job", I mean that overall it's within 10%.

But there are other reasons to keep the back end. Sometimes, I need to tweak it to support something specific. For example,

1. the stuff to hook together module constructors
2. thread local storage
3. position independent code
4. support for various function call sequences
5. D symbolic debug info
6. Generating libraries directly
7. Breaking a module up into multiple object files

and coming soon:

8. insertion of memory fences

Other possibilities are D specific optimizations, like taking advantage of immutability and purity, that I doubt exist in a back end designed for C/C++.

While of course all this can be added to any back end, I understand how to do it to mine, and it would take me a lot of time to understand another well enough to be able to know just where to put the fix in.

Another thing I'd be very unwilling to give up on with the dmd back end is how fast it is. DMC is *still* by far the fastest compiler out there.
December 14, 2008
Bill Baxter wrote:
> On Sun, Dec 14, 2008 at 5:13 AM, Christian Kamm <kamm-incasoftware@removethis.de> wrote:
>>> Speaking of LDC, any chance that the exception handling on Win32 gets fixed in the near future?
>> No, unfortunately.
>>
>> It's a problem with LLVM only supporting Dwarf2 exception handling. I'm pretty sure it'd work if we used ELF for the object files and GCC for linking, but Windows people tell me this is hardly acceptable.
>>
>> We won't get 'real' exceptions working on Windows until someone adds SEH support to LLVM.
>>
>> Volunteers?
>>
>>
> 
> Hmm, so what does clang do then?  Does it also just fail on Windows? Anyway, I signed up for the clang dev mailing list to ask this question there too...
> 
	And what about llvm-g++?

		Jerome
- --
mailto:jeberger@free.fr
http://jeberger.free.fr
Jabber: jeberger@jabber.fr
December 14, 2008
dsimcha wrote:

> == Quote from Jason House (jason.james.house@gmail.com)'s article
>> I couldn't agree more!
>> I never understood why people were so anti-gdc.  I would not be surprised
>> to
> hear that the gdc developer(s) stopped after hearing just how little people appreciated their hard work.
> 
> Well, GDC hasn't released an update since the Stone Age.  A few days ago,
> the
> first checkins in months took place.  I still don't know whether the
> project is
> moribund or why else it might be so far behind the curve.  My hope is that
> the GDC people are just waiting for the dust to settle a little on D2,
> rather than maintaining a moving target.

Related to the commit the other day is this post I made:

http://www.dsource.org/projects/tango/forums/topic/664

I think Arthur intend to have something posted on D.announce too.

-- 
Lars Ivar Igesund
blog at http://larsivi.net
DSource, #d.tango & #D: larsivi
Dancing the Tango
December 14, 2008
On Sun, Dec 14, 2008 at 7:23 PM, Lars Ivar Igesund <larsivar@igesund.net> wrote:
> dsimcha wrote:
>
>> == Quote from Jason House (jason.james.house@gmail.com)'s article
>>> I couldn't agree more!
>>> I never understood why people were so anti-gdc.  I would not be surprised
>>> to
>> hear that the gdc developer(s) stopped after hearing just how little people appreciated their hard work.
>>
>> Well, GDC hasn't released an update since the Stone Age.  A few days ago,
>> the
>> first checkins in months took place.  I still don't know whether the
>> project is
>> moribund or why else it might be so far behind the curve.  My hope is that
>> the GDC people are just waiting for the dust to settle a little on D2,
>> rather than maintaining a moving target.
>
> Related to the commit the other day is this post I made:
>
> http://www.dsource.org/projects/tango/forums/topic/664
>
> I think Arthur intend to have something posted on D.announce too.

So who is this Aurthur and what connection does he have to GDC?  Is
this a new fork of GDC?
Also from the forum post
(http://www.dsource.org/projects/tango/forums/topic/664#2672)
it wasn't clear to me if this was actually about GDC contributions or
contributions to Tango to make it work with GDC.
(I was going to ask on the tango forum but for some odd reason the
thread is locked.)


--bb
December 14, 2008
Walter Bright:
>that I doubt exist in a back end designed for C/C++.<

But note this has the disadvantage of making less easy to adapt a backend (like LLVM) to D. This may reduce or slow down the diffusion of D to other compilers and platforms. So every one of such special feature backend has to chosen with care.

In the near term most people may chose LLVM as the most used backend for the D language, so if LLVM isn't able to support some of those features (but exceptions are too much basic, they will be necessary), such features will become virtually absent from D programs you can see around and in the end from D language itself.

Bye,
bearophile
December 14, 2008
bearophile schrieb:
> Walter Bright:
>>that I doubt exist in a back end designed for C/C++.<
> 
> But note this has the disadvantage of making less easy to adapt a backend (like LLVM) to D. This may reduce or slow down the diffusion of D to other compilers and platforms. So every one of such special feature backend has to chosen with care.
> 
> In the near term most people may chose LLVM as the most used backend for the D language, so if LLVM isn't able to support some of those features (but exceptions are too much basic, they will be necessary), such features will become virtually absent from D programs you can see around and in the end from D language itself.
> 
> Bye,
> bearophile

his own backend is better for the evolution of D - and THAT is what we want - there a serveral good(and even bad) compiler-backends out there but the language is still missing

the backend-problems will be addressed later - and there won't be a show stopper not in LLVM, GCC or .NET ...



December 14, 2008
dennis luehring:
> his own backend is better for the evolution of D<

I don't understand most of your post, sorry.
For example are you here saying that the backend of DMD is better for the future evolution of D? This sounds false (No 64 bit, no much changes for many years, etc).

Bye,
bearophile
December 14, 2008
Bill Baxter wrote:

> On Sun, Dec 14, 2008 at 7:23 PM, Lars Ivar Igesund <larsivar@igesund.net> wrote:
>> dsimcha wrote:
>>
>>> == Quote from Jason House (jason.james.house@gmail.com)'s article
>>>> I couldn't agree more!
>>>> I never understood why people were so anti-gdc.  I would not be
>>>> surprised to
>>> hear that the gdc developer(s) stopped after hearing just how little people appreciated their hard work.
>>>
>>> Well, GDC hasn't released an update since the Stone Age.  A few days
>>> ago, the
>>> first checkins in months took place.  I still don't know whether the
>>> project is
>>> moribund or why else it might be so far behind the curve.  My hope is
>>> that the GDC people are just waiting for the dust to settle a little on
>>> D2, rather than maintaining a moving target.
>>
>> Related to the commit the other day is this post I made:
>>
>> http://www.dsource.org/projects/tango/forums/topic/664
>>
>> I think Arthur intend to have something posted on D.announce too.
> 
> So who is this Aurthur and what connection does he have to GDC?  Is
> this a new fork of GDC?
> Also from the forum post
> (http://www.dsource.org/projects/tango/forums/topic/664#2672)
> it wasn't clear to me if this was actually about GDC contributions or
> contributions to Tango to make it work with GDC.
> (I was going to ask on the tango forum but for some odd reason the
> thread is locked.)
> 
> 
> --bb

Sorry, I clarified that it was about GDC contributions. Arthur is Debian's GDC mantainer, and as far as I know, the only person beyond David with commit access to GDC.

The forum is locked because it is what provides the list on the front page with items, and as it is, the forum doesn't allow to only lock for new threads. Hopefully that can be added to the software later on.

-- 
Lars Ivar Igesund
blog at http://larsivi.net
DSource, #d.tango & #D: larsivi
Dancing the Tango
December 14, 2008
bearophile schrieb:
> dennis luehring:
>> his own backend is better for the evolution of D<
> 
> I don't understand most of your post, sorry.
> For example are you here saying that the backend of DMD is better for the future evolution of D? This sounds false (No 64 bit, no much changes for many years, etc).
> 
> Bye,
> bearophile

>better for the future evolution
i mean current ...

my target is the language D itself - it is much easier for walter to work the ideas out in his own backend because he known exactly how it works - so the speed of integrating language features for our tryout is much higher (and thats good for language evolution) - the usage of an "better" backend in the current phase of D2/(3) evolution will be a great slowdown - you can see the amount of work and the hard way to keep it up to date in the gdc/ldc implementation

the language must become greate first - backends and poeple who are interested in maintance them will come...


December 14, 2008
> the language must become greate first - backends and poeple who are interested in maintance them will come...

my hope personal (freaky) hope is that Intel or AMD getting
interested in D or maybe the CodePlay guys... :-)