Re: LLVM IR influence on compiler debugging

2012-07-10 Thread Jacob Carlborg
On 2012-07-09 22:43, Simen Kjaeraas wrote: You mean there are actually people out there who believe documentation can be correct, not to mention understandable, comprehensive and giving the information you need? You do know there are closed source libraries where you don't have an option.

Re: LLVM IR influence on compiler debugging

2012-07-10 Thread Simen Kjaeraas
On Tue, 10 Jul 2012 08:33:17 +0200, Jacob Carlborg d...@me.com wrote: On 2012-07-09 22:43, Simen Kjaeraas wrote: You mean there are actually people out there who believe documentation can be correct, not to mention understandable, comprehensive and giving the information you need? You do

Re: LLVM IR influence on compiler debugging

2012-07-09 Thread Simen Kjaeraas
On Sun, 08 Jul 2012 13:26:53 +0200, Jacob Carlborg d...@me.com wrote: On 2012-07-07 20:49, Walter Bright wrote: On 7/7/2012 3:46 AM, Jacob Carlborg wrote: Theoretically you should be able to just look at the documentation HAHAHAHAHAHAHAHAHAHAHA!!! Yeah, I know how you feel about

Re: LLVM IR influence on compiler debugging

2012-07-09 Thread Jonathan M Davis
On Monday, July 09, 2012 22:43:19 Simen Kjaeraas wrote: On Sun, 08 Jul 2012 13:26:53 +0200, Jacob Carlborg d...@me.com wrote: On 2012-07-07 20:49, Walter Bright wrote: On 7/7/2012 3:46 AM, Jacob Carlborg wrote: Theoretically you should be able to just look at the documentation

Re: LLVM IR influence on compiler debugging

2012-07-08 Thread Walter Bright
On 7/7/2012 9:16 PM, Adam Wilson wrote: I still see pretty heinous backend problems crop up in the bug reports for DMD. Come on, it's pretty stable. Do you watch the bug reports for gcc? I remember a guy recently ran some exhaustive code gen tests over C compilers, and dmc (the same back end

Re: LLVM IR influence on compiler debugging

2012-07-08 Thread Adam Wilson
On Sat, 07 Jul 2012 23:47:45 -0700, Walter Bright newshou...@digitalmars.com wrote: On 7/7/2012 9:16 PM, Adam Wilson wrote: I still see pretty heinous backend problems crop up in the bug reports for DMD. Come on, it's pretty stable. Do you watch the bug reports for gcc? I remember a guy

Re: LLVM IR influence on compiler debugging

2012-07-08 Thread Jacob Carlborg
On 2012-07-07 20:49, Walter Bright wrote: On 7/7/2012 3:46 AM, Jacob Carlborg wrote: Theoretically you should be able to just look at the documentation HAHAHAHAHAHAHAHAHAHAHA!!! Yeah, I know how you feel about documentation. -- /Jacob Carlborg

Re: LLVM IR influence on compiler debugging

2012-07-08 Thread Jacob Carlborg
On 2012-07-08 06:16, Adam Wilson wrote: As to compile speed, is LDC really *THAT* much slower than DMD so as to cause C++ style speed issues? I thought one of the whole points of D is that it doesn't need the epic numbers of passes and preprocessor that C++ does precisely because that's what

Re: LLVM IR influence on compiler debugging

2012-07-08 Thread Sean Cavanaugh
On 7/7/2012 11:05 PM, Andrei Alexandrescu wrote: Compilation is a huge bottleneck for any major C++ code base, and adding hardware (distributing compilation etc) is survival, but definitely doesn't scale to make the problem negligible. In contrast, programmers have considerable control about

Re: LLVM IR influence on compiler debugging

2012-07-07 Thread Paulo Pinto
On Saturday, 7 July 2012 at 04:39:25 UTC, Adam Wilson wrote: On Fri, 06 Jul 2012 18:33:02 -0700, Walter Bright newshou...@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

Re: LLVM IR influence on compiler debugging

2012-07-07 Thread Jacob Carlborg
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

Re: LLVM IR influence on compiler debugging

2012-07-07 Thread Jacob Carlborg
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

Re: LLVM IR influence on compiler debugging

2012-07-07 Thread Alex Rønne Petersen
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

Re: LLVM IR influence on compiler debugging

2012-07-07 Thread Walter Bright
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.

Re: LLVM IR influence on compiler debugging

2012-07-07 Thread Walter Bright
On 7/7/2012 3:46 AM, Jacob Carlborg wrote: Theoretically you should be able to just look at the documentation HAHAHAHAHAHAHAHAHAHAHA!!!

Re: LLVM IR influence on compiler debugging

2012-07-07 Thread Alex Rønne Petersen
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

Re: LLVM IR influence on compiler debugging

2012-07-07 Thread Jonathan M Davis
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,

Re: LLVM IR influence on compiler debugging

2012-07-07 Thread Walter Bright
On 7/7/2012 11:59 AM, 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? Yes, barring some horrible obstacle.

Re: LLVM IR influence on compiler debugging

2012-07-07 Thread Adam Wilson
On Sat, 07 Jul 2012 11:49:16 -0700, Walter Bright newshou...@digitalmars.com wrote: On 7/7/2012 3:46 AM, Jacob Carlborg wrote: Theoretically you should be able to just look at the documentation HAHAHAHAHAHAHAHAHAHAHA!!! Unfortunately, I have to agree with this sentiment. I was

Re: LLVM IR influence on compiler debugging

2012-07-07 Thread Adam Wilson
On Sat, 07 Jul 2012 11:48:44 -0700, Walter Bright newshou...@digitalmars.com 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

Re: LLVM IR influence on compiler debugging

2012-07-07 Thread bearophile
Adam Wilson: Gentlemen, from a business prospective, compiler and/or project build times are the least of your problems. If DMD compiles quickly, I am able to compile one or more times every day, so I'm able to test it frequently. Other people do the same. The result is a better compiler

Re: LLVM IR influence on compiler debugging

2012-07-07 Thread Walter Bright
On 7/7/2012 4:08 PM, Adam Wilson wrote: On Sat, 07 Jul 2012 11:48:44 -0700, Walter Bright newshou...@digitalmars.com 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

Re: LLVM IR influence on compiler debugging

2012-07-07 Thread Adam Wilson
On Sat, 07 Jul 2012 16:15:11 -0700, Walter Bright newshou...@digitalmars.com wrote: On 7/7/2012 4:08 PM, Adam Wilson wrote: On Sat, 07 Jul 2012 11:48:44 -0700, Walter Bright newshou...@digitalmars.com wrote: On 7/7/2012 8:38 AM, Alex Rønne Petersen wrote: On a high-end 4-core x86,

Re: LLVM IR influence on compiler debugging

2012-07-07 Thread Timon Gehr
On 07/08/2012 01:28 AM, Adam Wilson wrote: On Sat, 07 Jul 2012 16:15:11 -0700, Walter Bright newshou...@digitalmars.com wrote: On 7/7/2012 4:08 PM, Adam Wilson wrote: On Sat, 07 Jul 2012 11:48:44 -0700, Walter Bright newshou...@digitalmars.com wrote: On 7/7/2012 8:38 AM, Alex Rønne Petersen

Re: LLVM IR influence on compiler debugging

2012-07-07 Thread Walter Bright
On 7/7/2012 4:28 PM, Adam Wilson wrote: I imagine that it does, and honestly, I am not terribly concerned if DMD stays with it's current backend because once LLVM gets SEH, im gone. But I do wonder if DMD will become increasingly irrelevant as backends like GCC and LLVM advance. And I am

Re: LLVM IR influence on compiler debugging

2012-07-07 Thread Adam Wilson
On Sat, 07 Jul 2012 16:34:53 -0700, Walter Bright newshou...@digitalmars.com wrote: On 7/7/2012 4:28 PM, Adam Wilson wrote: I imagine that it does, and honestly, I am not terribly concerned if DMD stays with it's current backend because once LLVM gets SEH, im gone. But I do wonder if DMD

Re: LLVM IR influence on compiler debugging

2012-07-07 Thread Adam Wilson
On Sat, 07 Jul 2012 16:38:27 -0700, Timon Gehr timon.g...@gmx.ch wrote: On 07/08/2012 01:28 AM, Adam Wilson wrote: On Sat, 07 Jul 2012 16:15:11 -0700, Walter Bright newshou...@digitalmars.com wrote: On 7/7/2012 4:08 PM, Adam Wilson wrote: On Sat, 07 Jul 2012 11:48:44 -0700, Walter Bright

Re: LLVM IR influence on compiler debugging

2012-07-07 Thread Jonathan M Davis
On Saturday, July 07, 2012 16:52:25 Adam Wilson wrote: Agreed, but not many people have push rights to the website, which is where I would start. The lack of commit rights to d-programming-language.org doesn't stop you from submitting pull requests. It just stops you from putting your edits

Re: LLVM IR influence on compiler debugging

2012-07-07 Thread Jonathan M Davis
On Saturday, July 07, 2012 16:54:48 Adam Wilson wrote: On Sat, 07 Jul 2012 16:38:27 -0700, Timon Gehr timon.g...@gmx.ch wrote: The DMD backend is very fast in comparison to other backends. LLVM is unlikely to catch up in speed, because it is well architectured and more general. Oh, I

Re: LLVM IR influence on compiler debugging

2012-07-07 Thread Timon Gehr
On 07/08/2012 01:54 AM, Adam Wilson wrote: On Sat, 07 Jul 2012 16:38:27 -0700, Timon Gehr timon.g...@gmx.ch wrote: On 07/08/2012 01:28 AM, Adam Wilson wrote: On Sat, 07 Jul 2012 16:15:11 -0700, Walter Bright newshou...@digitalmars.com wrote: On 7/7/2012 4:08 PM, Adam Wilson wrote: On Sat,

Re: LLVM IR influence on compiler debugging

2012-07-07 Thread Adam Wilson
On Sat, 07 Jul 2012 17:22:27 -0700, Timon Gehr timon.g...@gmx.ch wrote: On 07/08/2012 01:54 AM, Adam Wilson wrote: On Sat, 07 Jul 2012 16:38:27 -0700, Timon Gehr timon.g...@gmx.ch wrote: On 07/08/2012 01:28 AM, Adam Wilson wrote: On Sat, 07 Jul 2012 16:15:11 -0700, Walter Bright

Re: LLVM IR influence on compiler debugging

2012-07-07 Thread Adam Wilson
On Sat, 07 Jul 2012 17:04:35 -0700, Jonathan M Davis jmdavisp...@gmx.com wrote: On Saturday, July 07, 2012 16:54:48 Adam Wilson wrote: On Sat, 07 Jul 2012 16:38:27 -0700, Timon Gehr timon.g...@gmx.ch wrote: The DMD backend is very fast in comparison to other backends. LLVM is unlikely

Re: LLVM IR influence on compiler debugging

2012-07-07 Thread Alex Rønne Petersen
On 08-07-2012 01:57, Jonathan M Davis wrote: On Saturday, July 07, 2012 16:52:25 Adam Wilson wrote: Agreed, but not many people have push rights to the website, which is where I would start. The lack of commit rights to d-programming-language.org doesn't stop you from submitting pull

Re: LLVM IR influence on compiler debugging

2012-07-07 Thread Adam Wilson
On Sat, 07 Jul 2012 17:32:28 -0700, Alex Rønne Petersen a...@lycus.org wrote: On 08-07-2012 01:57, Jonathan M Davis wrote: On Saturday, July 07, 2012 16:52:25 Adam Wilson wrote: Agreed, but not many people have push rights to the website, which is where I would start. The lack of commit

Re: LLVM IR influence on compiler debugging

2012-07-07 Thread Jonathan M Davis
On Sunday, July 08, 2012 02:32:28 Alex Rønne Petersen wrote: On 08-07-2012 01:57, Jonathan M Davis wrote: On Saturday, July 07, 2012 16:52:25 Adam Wilson wrote: Agreed, but not many people have push rights to the website, which is where I would start. The lack of commit rights to

Re: LLVM IR influence on compiler debugging

2012-07-07 Thread Joseph Rushton Wakeling
On 08/07/12 01:52, Adam Wilson wrote: I personally don't feel it is terribly wise for my business to by tied to the Stallmanology of GCC What's the problem here? The licence of the compiler places no restrictions on the licence of the code you build with it.

Re: LLVM IR influence on compiler debugging

2012-07-07 Thread Adam Wilson
On Sat, 07 Jul 2012 17:44:09 -0700, Joseph Rushton Wakeling joseph.wakel...@webdrake.net wrote: On 08/07/12 01:52, Adam Wilson wrote: I personally don't feel it is terribly wise for my business to by tied to the Stallmanology of GCC What's the problem here? The licence of the compiler

Re: LLVM IR influence on compiler debugging

2012-07-07 Thread Adam Wilson
On Sat, 07 Jul 2012 17:39:49 -0700, Jonathan M Davis jmdavisp...@gmx.com wrote: On Sunday, July 08, 2012 02:32:28 Alex Rønne Petersen wrote: On 08-07-2012 01:57, Jonathan M Davis wrote: On Saturday, July 07, 2012 16:52:25 Adam Wilson wrote: Agreed, but not many people have push rights to

Re: LLVM IR influence on compiler debugging

2012-07-07 Thread Andrei Alexandrescu
On 7/7/12 8:29 PM, Adam Wilson wrote: Sure they complain, but they would complain harder if the generated code was sub-optimal or had bugs in it. And I imagine that multiple hour build times are more the exception than rule even in C++, my understanding is that all 50mloc of Windows can compile

Re: LLVM IR influence on compiler debugging

2012-07-07 Thread Adam Wilson
On Sat, 07 Jul 2012 19:33:22 -0700, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: On 7/7/12 8:29 PM, Adam Wilson wrote: Sure they complain, but they would complain harder if the generated code was sub-optimal or had bugs in it. And I imagine that multiple hour build times are more

Re: LLVM IR influence on compiler debugging

2012-07-07 Thread Andrei Alexandrescu
On 7/7/12 11:26 PM, Adam Wilson wrote: On Sat, 07 Jul 2012 19:33:22 -0700, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: On 7/7/12 8:29 PM, Adam Wilson wrote: Sure they complain, but they would complain harder if the generated code was sub-optimal or had bugs in it. And I imagine

Re: LLVM IR influence on compiler debugging

2012-07-07 Thread Jonathan M Davis
On Saturday, July 07, 2012 20:26:56 Adam Wilson wrote: On Sat, 07 Jul 2012 19:33:22 -0700, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: On 7/7/12 8:29 PM, Adam Wilson wrote: Sure they complain, but they would complain harder if the generated code was sub-optimal or had bugs

Re: LLVM IR influence on compiler debugging

2012-07-07 Thread Adam Wilson
On Sat, 07 Jul 2012 21:05:12 -0700, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: On 7/7/12 11:26 PM, Adam Wilson wrote: On Sat, 07 Jul 2012 19:33:22 -0700, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: On 7/7/12 8:29 PM, Adam Wilson wrote: Sure they complain, but

Re: LLVM IR influence on compiler debugging

2012-07-07 Thread Adam Wilson
On Sat, 07 Jul 2012 21:13:35 -0700, Jonathan M Davis jmdavisp...@gmx.com wrote: On Saturday, July 07, 2012 20:26:56 Adam Wilson wrote: On Sat, 07 Jul 2012 19:33:22 -0700, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: On 7/7/12 8:29 PM, Adam Wilson wrote: Sure they complain, but

Re: LLVM IR influence on compiler debugging

2012-07-07 Thread Alex Rønne Petersen
On 08-07-2012 06:44, Adam Wilson wrote: On Sat, 07 Jul 2012 21:13:35 -0700, Jonathan M Davis jmdavisp...@gmx.com wrote: On Saturday, July 07, 2012 20:26:56 Adam Wilson wrote: On Sat, 07 Jul 2012 19:33:22 -0700, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: On 7/7/12 8:29 PM, Adam

Re: LLVM IR influence on compiler debugging

2012-07-07 Thread Adam Wilson
On Sat, 07 Jul 2012 21:58:04 -0700, Alex Rønne Petersen a...@lycus.org wrote: On 08-07-2012 06:44, Adam Wilson wrote: On Sat, 07 Jul 2012 21:13:35 -0700, Jonathan M Davis jmdavisp...@gmx.com wrote: On Saturday, July 07, 2012 20:26:56 Adam Wilson wrote: On Sat, 07 Jul 2012 19:33:22 -0700,

Re: LLVM IR influence on compiler debugging

2012-07-06 Thread Kai Nacke
On 29.06.2012 11:27, Don Clugston wrote: It's a good design, especially for optimisation tests. Although I can't see an immediate application of this for D. LDC (https://github.com/ldc-developers/ldc/) uses LLVM. Kai

Re: LLVM IR influence on compiler debugging

2012-07-06 Thread Adam Wilson
On Fri, 29 Jun 2012 02:27:19 -0700, Don Clugston d...@nospam.com wrote: On 29/06/12 08:04, bearophile wrote: This is a very easy to read article about the design of LLVM: http://www.drdobbs.com/architecture-and-design/the-design-of-llvm/240001128 That IR has a great effect on making it

Re: LLVM IR influence on compiler debugging

2012-07-06 Thread bearophile
Adam Wilson: moving to LLVM would neatly solve an incredible number of sticky points with the current backend, I remember some small limits in the LLVM back-end, like not being able to use zero bits to implement fixed-size zero length arrays. And something regarding gotos in inline asm. I

Re: LLVM IR influence on compiler debugging

2012-07-06 Thread Jonathan M Davis
On Saturday, July 07, 2012 02:10:49 bearophile 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. The D reference compiler can't be DMD forever. Why not?

Re: LLVM IR influence on compiler debugging

2012-07-06 Thread Adam Wilson
On Fri, 06 Jul 2012 17:59:36 -0700, Jonathan M Davis jmdavisp...@gmx.com wrote: On Saturday, July 07, 2012 02:10:49 bearophile 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

Re: LLVM IR influence on compiler debugging

2012-07-06 Thread Jonathan M Davis
On Friday, July 06, 2012 18:07:54 Adam Wilson wrote: Walter can't use LLVM? Why not? He wouldn't have to work on LLVM and the glue code is considered front-end. I admit I am not terribly well informed of the legal issues here. But it seems to me that bolting the DMDFE onto a different

Re: LLVM IR influence on compiler debugging

2012-07-06 Thread Walter Bright
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.

Re: LLVM IR influence on compiler debugging

2012-07-06 Thread Adam Wilson
On Fri, 06 Jul 2012 18:33:02 -0700, Walter Bright newshou...@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

Re: LLVM IR influence on compiler debugging

2012-07-06 Thread Walter Bright
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

LLVM IR influence on compiler debugging

2012-06-29 Thread bearophile
This is a very easy to read article about the design of LLVM: http://www.drdobbs.com/architecture-and-design/the-design-of-llvm/240001128 It explains what the IR is: The most important aspect of its design is the LLVM Intermediate Representation (IR), which is the form it uses to represent

Re: LLVM IR influence on compiler debugging

2012-06-29 Thread Sönke Ludwig
I implemented a compiler back end with LLVM some time ago. The IM helped a lot in both, spotting errors in IM codegen and issues with target codegen (e.g. because of some misconfiguration). You always have the high level IM available as text and the unoptimized target assembler usually is

Re: LLVM IR influence on compiler debugging

2012-06-29 Thread Don Clugston
On 29/06/12 08:04, bearophile wrote: This is a very easy to read article about the design of LLVM: http://www.drdobbs.com/architecture-and-design/the-design-of-llvm/240001128 That IR has a great effect on making it simpler to debug the compiler, I think this is important (and I think it