View mode: basic / threaded / horizontal-split · Log in · Help
July 07, 2012
Re: LLVM IR influence on compiler debugging
On Fri, 06 Jul 2012 18:33:02 -0700, Walter Bright  
<newshound2@digitalmars.com> wrote:

> On 7/6/2012 4:50 PM, Adam Wilson wrote:
>> My guess is that, unless something changes significantly, DMD will  
>> remain a
>> niche tool; useful as a reference/research compiler, but for actual  
>> work people
>> will use LDC or GDC.
>
> A more diverse ecosystem that supports D is only for the better.
>

If this is what you want then I can be fine with it too. I just wanted to  
make my position clear. This also means that use cases are going to need  
to be clarified and a clear story crafted around the pro's and con's of  
each compiler to help us make a decision about which option is best for  
our needs. I was able to reach my conclusions, but only after months of  
immersion into the community. Needless to say, most people, open-source or  
commercial won't spend that kind of time...

In short, more promotion of the options on dlang.org.

-- 
Adam Wilson
IRC: LightBender
Project Coordinator
The Horizon Project
http://www.thehorizonproject.org/
July 07, 2012
Re: LLVM IR influence on compiler debugging
On 7/6/2012 9:39 PM, Adam Wilson wrote:
> If this is what you want then I can be fine with it too. I just wanted to make
> my position clear. This also means that use cases are going to need to be
> clarified and a clear story crafted around the pro's and con's of each compiler
> to help us make a decision about which option is best for our needs. I was able
> to reach my conclusions, but only after months of immersion into the community.
> Needless to say, most people, open-source or commercial won't spend that kind of
> time...
>
> In short, more promotion of the options on dlang.org.

No matter what I write about the pros and cons, I will be accused of bias and 
there will be hard feelings. So I prefer that individuals make up their own minds.
July 07, 2012
Re: LLVM IR influence on compiler debugging
On Saturday, 7 July 2012 at 04:39:25 UTC, Adam Wilson wrote:
> On Fri, 06 Jul 2012 18:33:02 -0700, Walter Bright 
> <newshound2@digitalmars.com> wrote:
>
>> On 7/6/2012 4:50 PM, Adam Wilson wrote:
>>> My guess is that, unless something changes significantly, DMD 
>>> will remain a
>>> niche tool; useful as a reference/research compiler, but for 
>>> actual work people
>>> will use LDC or GDC.
>>
>> A more diverse ecosystem that supports D is only for the 
>> better.
>>
>
> If this is what you want then I can be fine with it too. I just 
> wanted to make my position clear. This also means that use 
> cases are going to need to be clarified and a clear story 
> crafted around the pro's and con's of each compiler to help us 
> make a decision about which option is best for our needs. I was 
> able to reach my conclusions, but only after months of 
> immersion into the community. Needless to say, most people, 
> open-source or commercial won't spend that kind of time...
>
> In short, more promotion of the options on dlang.org.

How different is this from C, C++, Pascal, Modula, Ada, Java 
compilers?

As long as all implement the language standard, it is all for the 
better.

--
Paulo
July 07, 2012
Re: LLVM IR influence on compiler debugging
On 2012-07-07 01:50, Adam Wilson wrote:

> My guess is that, unless something changes significantly, DMD will
> remain a niche tool; useful as a reference/research compiler, but for
> actual work people will use LDC or GDC.

One think I really like about DMD is that is really fast at compiling. 
It's also a lot faster to compile DMD and LDC/GDC, especially if you 
need to compile the backends.

> At the moment, the ONLY reasons I use DMD are to test my changes to the
> compiler and that LLVM doesn't yet support SEH. As soon as LDC supports
> SEH, and it will (I hear 3.2 will), I will move all my work to LDC. So
> what if it's a version or two behind, it has superior code generation
> and better Windows support (COFF/x64 anybody?).

That is being worked on:

https://github.com/D-Programming-Language/dmd/commit/2511126cd7a234797e8b32515e419ce4f84ca928

-- 
/Jacob Carlborg
July 07, 2012
Re: LLVM IR influence on compiler debugging
On 2012-07-07 03:17, Jonathan M Davis wrote:

> Walter refuses to look at the code for any other compiler. He has been well
> served in the past by being able to say that he has never looked at the code
> of another compiler when the lawyers come knocking. So, as I understand it,
> anything that would require him to even _look_ at the backend's code, let
> alone work on it, would make it so he won't do it. And I very much doubt that
> he'd want to work on a compiler where he can't work on the backend (plus, I
> would assume that you'd have to look at the backend to work on the glue code,
> so he'd be restricted entirely to the frontend-specific portions of the
> compiler).

Theoretically you should be able to just look at the documentation but I 
understand what you're meaning.

-- 
/Jacob Carlborg
July 07, 2012
Re: LLVM IR influence on compiler debugging
On 07-07-2012 12:45, Jacob Carlborg wrote:
> On 2012-07-07 01:50, Adam Wilson wrote:
>
>> My guess is that, unless something changes significantly, DMD will
>> remain a niche tool; useful as a reference/research compiler, but for
>> actual work people will use LDC or GDC.
>
> One think I really like about DMD is that is really fast at compiling.
> It's also a lot faster to compile DMD and LDC/GDC, especially if you
> need to compile the backends.

True, but then again, DMD only targets /one/ architecture, while e.g. 
LLVM targets lots. On a high-end 4-core x86, building LLVM and LDC can 
usually be done in less than an hour, even when building them in 
optimized mode. Plus, you usually don't need to recompile LLVM anyway, 
only LDC.

>
>> At the moment, the ONLY reasons I use DMD are to test my changes to the
>> compiler and that LLVM doesn't yet support SEH. As soon as LDC supports
>> SEH, and it will (I hear 3.2 will), I will move all my work to LDC. So
>> what if it's a version or two behind, it has superior code generation
>> and better Windows support (COFF/x64 anybody?).
>
> That is being worked on:
>
> https://github.com/D-Programming-Language/dmd/commit/2511126cd7a234797e8b32515e419ce4f84ca928
>
>

I just hope this will mean we can use the Microsoft linker...

-- 
Alex Rønne Petersen
alex@lycus.org
http://lycus.org
July 07, 2012
Re: LLVM IR influence on compiler debugging
On 7/7/2012 8:38 AM, Alex Rønne Petersen wrote:
> On a high-end 4-core x86, building LLVM and LDC can usually be
> done in less than an hour, even when building them in optimized mode.

Building dmd on my Windows box takes 26 seconds, optimized, using a single core.
July 07, 2012
Re: LLVM IR influence on compiler debugging
On 7/7/2012 3:46 AM, Jacob Carlborg wrote:
> Theoretically you should be able to just look at the documentation


HAHAHAHAHAHAHAHAHAHAHAAAAA!!!
July 07, 2012
Re: LLVM IR influence on compiler debugging
On 07-07-2012 20:48, Walter Bright wrote:
> On 7/7/2012 8:38 AM, Alex Rønne Petersen wrote:
>> On a high-end 4-core x86, building LLVM and LDC can usually be
>> done in less than an hour, even when building them in optimized mode.
>
> Building dmd on my Windows box takes 26 seconds, optimized, using a
> single core.

Right, it's even faster for me on Linux. Keep in mind, though, that LLVM 
is usually a "build once, then link to/use" thing. Building LDC itself 
is just building DMD + the glue layer (excluding druntime and phobos), 
which is relatively fast.


By the way, is it planned that DMD will be able to use Microsoft's 
linker when compiling with COFF? Or is it too early to say at this 
point? (It would simplify a lot of things; particularly, integration 
with MSVC projects. Further, Optlink's command line is really unfriendly 
and hard to integrate in most build systems.)

-- 
Alex Rønne Petersen
alex@lycus.org
http://lycus.org
July 07, 2012
Re: LLVM IR influence on compiler debugging
On Saturday, July 07, 2012 20:59:23 Alex Rønne Petersen wrote:
> By the way, is it planned that DMD will be able to use Microsoft's
> linker when compiling with COFF? Or is it too early to say at this
> point? (It would simplify a lot of things; particularly, integration
> with MSVC projects. Further, Optlink's command line is really unfriendly
> and hard to integrate in most build systems.)

Walter announced a couple of weeks ago that he's going to work on adding COFF 
support to dmd on Windows so that it can be used with Microsoft's linker, and 
he's started on it (though I don't know if he's gotten very far on it yet - 
there's been one related commit that I'm aware of).

- Jonathan M Davis
1 2 3 4 5 6
Top | Discussion index | About this forum | D home