www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ldc - LDC 0.13.0 alpha released! Please help test!

reply "Kai Nacke" <kai redstar.de> writes:
Hi everyone!

The first alpha release of LDC release 0.13.0 is here! It is 
based on the 2.064.2 front-end and LLVM 3.1-3.4 (OS X: LLVM 
3.2/3.4 only).

Please refer to the GitHub release page for the preliminary 
change log and the
package download links:
https://github.com/ldc-developers/ldc/releases/tag/v0.13.0-alpha1

Important: This is an alpha version and contains known bugs. Be 
sure to read the section "Known bugs (release blocker)" in the 
preliminary change log.

MD5 checksums for the release packages:

94d03baa5a48ed43cb3b713a3c9fc99a  ldc-0.13.0-alpha1-src.tar.gz
60018c5b9cbe27821fcb15a2293479f1  
ldc2-0.13.0-alpha1-linux-x86.tar.gz
8c9ab4bde280db84c037cfa7b1144eb8  
ldc2-0.13.0-alpha1-linux-x86.tar.xz
f2c464245be4d2a34fcd31ea6e903f9d  
ldc2-0.13.0-alpha1-linux-x86_64.tar.gz
6359c030afc6aaf74a3b6c7227d88007  
ldc2-0.13.0-alpha1-linux-x86_64.tar.xz
9c4903dc3ba9962c4ece95210eb2cff4  ldc2-0.13.0-alpha1-mingw-x86.7z
a1d0c45d1d46cb4ee9a3856869454891  ldc2-0.13.0-alpha1-mingw-x86.zip
103f59a8f5743a8c5349dd9593a2d3fd  
ldc2-0.13.0-alpha1-osx-x86_64.tar.gz
d42390ef6bab21eb634e6ecbb3170fb7  
ldc2-0.13.0-alpha1-osx-x86_64.tar.xz

As always, the Win32/MinGW packages require a recent version of 
the
mingw-w64 toolchain, see the (new) README file for details.

There is no Win64/MSVC package because I found a severe bug in 
the Win64/MSVC
port. I hope to have this fixed for the alpha2 or beta1 release.

Please be sure to report any bugs at
https://github.com/ldc-developers/ldc/issues, and feel free to 
drop by
at the digitalmars.D.ldc forums
(http://forum.dlang.org/group/digitalmars.D.ldc) for any 
questions or
comments.

Thanks to everybody involved in making this happen!

Regards,
Kai
Jan 28 2014
next sibling parent "Dicebot" <public dicebot.lv> writes:
It builds and runs hello world, I can verify that :)
Jan 29 2014
prev sibling next sibling parent reply "Mike" <none none.com> writes:
On Wednesday, 29 January 2014 at 07:24:16 UTC, Kai Nacke wrote:
 Hi everyone!

 The first alpha release of LDC release 0.13.0 is here! It is 
 based on the 2.064.2 front-end and LLVM 3.1-3.4 (OS X: LLVM 
 3.2/3.4 only).

 Please refer to the GitHub release page for the preliminary 
 change log and the
 package download links:
 https://github.com/ldc-developers/ldc/releases/tag/v0.13.0-alpha1
Thanks Kai, Any chance I can convince you to can include ARM Thumb targets in future releases? Mike
Jan 30 2014
parent "Kai Nacke" <kai redstar.de> writes:
Hi Mike!

On Thursday, 30 January 2014 at 09:40:49 UTC, Mike wrote:
 Thanks Kai,

 Any chance I can convince you to can include ARM Thumb targets 
 in future releases?
Yes, I am open to suggestions. :-) Maybe there other requests for other targets, too? Regards, Kai
Jan 30 2014
prev sibling next sibling parent reply "bearophile" <bearophileHUGS lycos.com> writes:
I am trying this, ldc2-0.13.0-alpha1-mingw-x86.7z, it seems I am 
hitting some crashes caused by associative arrays, so I can't use 
it yet.

 From the linked page:

Because of the new DSO infrastructure, the -noruntime switch is 
no longer supported. Now every module calls the runtime during 
initialization. Instead a new -nogc switch is introduced which 
warns about implicit GC calls.<
I suggest to also generate the line numbers where the GC is used. Bye, bearophile
Jan 30 2014
next sibling parent "Dicebot" <public dicebot.lv> writes:
 Instead a new -nogc switch is introduced which warns about 
 implicit GC calls.
Whoa, I have totally missed that! <3
Jan 30 2014
prev sibling next sibling parent reply "Kai Nacke" <kai redstar.de> writes:
Hi bearophile!

On Thursday, 30 January 2014 at 11:17:14 UTC, bearophile wrote:
 I am trying this, ldc2-0.13.0-alpha1-mingw-x86.7z, it seems I 
 am hitting some crashes caused by associative arrays, so I 
 can't use it yet.
(https://github.com/ldc-developers/ldc/issues/407) or something new? If it is new, could you please provide some details?
 From the linked page:

Because of the new DSO infrastructure, the -noruntime switch is 
no longer supported. Now every module calls the runtime during 
initialization. Instead a new -nogc switch is introduced which 
warns about implicit GC calls.<
I suggest to also generate the line numbers where the GC is used.
Good suggestion. Regards, Kai
Jan 30 2014
parent reply "bearophile" <bearophileHUGS lycos.com> writes:
Kai Nacke:

 I am trying this, ldc2-0.13.0-alpha1-mingw-x86.7z, it seems I 
 am hitting some crashes caused by associative arrays, so I 
 can't use it yet.
(https://github.com/ldc-developers/ldc/issues/407) or something new? If it is new, could you please provide some details?
Sorry for giving you an answer after three days, I didn't see this post :-( This is a program that compiles and run with dmd and crashes at run-time with the latest ldc2: http://codepad.org/tnz2aiAK I have not reduced it much, but the problem could be in the struct State. See also a comment of mine here: http://forum.dlang.org/thread/lclg26$1ha7$1 digitalmars.com Where I have tried to use a sanitizer on Windows. Perhaps it should be disabled in the Windows ldc2. Bye, bearophile
Feb 02 2014
parent reply "bearophile" <bearophileHUGS lycos.com> writes:
 This is a program that compiles and run with dmd and crashes at 
 run-time with the latest ldc2:

 http://codepad.org/tnz2aiAK

 I have not reduced it much, but the problem could be in the 
 struct State.
Bye, bearophile
Feb 05 2014
parent "Kai Nacke" <kai redstar.de> writes:
On Wednesday, 5 February 2014 at 10:52:05 UTC, bearophile wrote:
 This is a program that compiles and run with dmd and crashes 
 at run-time with the latest ldc2:

 http://codepad.org/tnz2aiAK

 I have not reduced it much, but the problem could be in the 
 struct State.
Bye, bearophile
Hi bearophile, thanks for the example. I saw your other post, too. I am still a bit slow - there is a backlog caused by FOSDEM talk. Regards, Kai
Feb 05 2014
prev sibling parent "Kai Nacke" <kai redstar.de> writes:
On Thursday, 30 January 2014 at 11:17:14 UTC, bearophile wrote:
 I suggest to also generate the line numbers where the GC is 
 used.

 Bye,
 bearophile
Should be fixed with this PR: https://github.com/ldc-developers/ldc/pull/660 Regards, Kai
Jul 01 2014
prev sibling next sibling parent "Artem Tarasov" <lomereiter gmail.com> writes:
On Wednesday, 29 January 2014 at 07:24:16 UTC, Kai Nacke wrote:
 Hi everyone!

 The first alpha release of LDC release 0.13.0 is here! It is 
 based on the 2.064.2 front-end and LLVM 3.1-3.4 (OS X: LLVM 
 3.2/3.4 only).
Thanks! May I repeat here my wish to include `rdmd` into binary distributions? Rationale: DMD is inappropriate for release builds if good performance is desired, and it's inconvenient to download both compilers for someone who just wishes to build an application from source.
Feb 01 2014
prev sibling next sibling parent reply "Ilya Yaroshenko" <ilyayaroshenko gmail.com> writes:
Hello Kai!

What version of llvm is used in linux_x64 binaries?

On Wednesday, 29 January 2014 at 07:24:16 UTC, Kai Nacke wrote:
 Hi everyone!

 The first alpha release of LDC release 0.13.0 is here! It is 
 based on the 2.064.2 front-end and LLVM 3.1-3.4 (OS X: LLVM 
 3.2/3.4 only).

 Please refer to the GitHub release page for the preliminary 
 change log and the
 package download links:
 https://github.com/ldc-developers/ldc/releases/tag/v0.13.0-alpha1

 Important: This is an alpha version and contains known bugs. Be 
 sure to read the section "Known bugs (release blocker)" in the 
 preliminary change log.

 MD5 checksums for the release packages:

 94d03baa5a48ed43cb3b713a3c9fc99a  ldc-0.13.0-alpha1-src.tar.gz
 60018c5b9cbe27821fcb15a2293479f1  
 ldc2-0.13.0-alpha1-linux-x86.tar.gz
 8c9ab4bde280db84c037cfa7b1144eb8  
 ldc2-0.13.0-alpha1-linux-x86.tar.xz
 f2c464245be4d2a34fcd31ea6e903f9d  
 ldc2-0.13.0-alpha1-linux-x86_64.tar.gz
 6359c030afc6aaf74a3b6c7227d88007  
 ldc2-0.13.0-alpha1-linux-x86_64.tar.xz
 9c4903dc3ba9962c4ece95210eb2cff4  
 ldc2-0.13.0-alpha1-mingw-x86.7z
 a1d0c45d1d46cb4ee9a3856869454891  
 ldc2-0.13.0-alpha1-mingw-x86.zip
 103f59a8f5743a8c5349dd9593a2d3fd  
 ldc2-0.13.0-alpha1-osx-x86_64.tar.gz
 d42390ef6bab21eb634e6ecbb3170fb7  
 ldc2-0.13.0-alpha1-osx-x86_64.tar.xz

 As always, the Win32/MinGW packages require a recent version of 
 the
 mingw-w64 toolchain, see the (new) README file for details.

 There is no Win64/MSVC package because I found a severe bug in 
 the Win64/MSVC
 port. I hope to have this fixed for the alpha2 or beta1 release.

 Please be sure to report any bugs at
 https://github.com/ldc-developers/ldc/issues, and feel free to 
 drop by
 at the digitalmars.D.ldc forums
 (http://forum.dlang.org/group/digitalmars.D.ldc) for any 
 questions or
 comments.

 Thanks to everybody involved in making this happen!

 Regards,
 Kai
Feb 02 2014
parent "Ilya Yaroshenko" <ilyayaroshenko gmail.com> writes:
I found that it is 3.4 from ldmd2 =)

On Sunday, 2 February 2014 at 21:22:13 UTC, Ilya Yaroshenko wrote:
 Hello Kai!

 What version of llvm is used in linux_x64 binaries?

 On Wednesday, 29 January 2014 at 07:24:16 UTC, Kai Nacke wrote:
 Hi everyone!

 The first alpha release of LDC release 0.13.0 is here! It is 
 based on the 2.064.2 front-end and LLVM 3.1-3.4 (OS X: LLVM 
 3.2/3.4 only).

 Please refer to the GitHub release page for the preliminary 
 change log and the
 package download links:
 https://github.com/ldc-developers/ldc/releases/tag/v0.13.0-alpha1

 Important: This is an alpha version and contains known bugs. 
 Be sure to read the section "Known bugs (release blocker)" in 
 the preliminary change log.

 MD5 checksums for the release packages:

 94d03baa5a48ed43cb3b713a3c9fc99a  ldc-0.13.0-alpha1-src.tar.gz
 60018c5b9cbe27821fcb15a2293479f1  
 ldc2-0.13.0-alpha1-linux-x86.tar.gz
 8c9ab4bde280db84c037cfa7b1144eb8  
 ldc2-0.13.0-alpha1-linux-x86.tar.xz
 f2c464245be4d2a34fcd31ea6e903f9d  
 ldc2-0.13.0-alpha1-linux-x86_64.tar.gz
 6359c030afc6aaf74a3b6c7227d88007  
 ldc2-0.13.0-alpha1-linux-x86_64.tar.xz
 9c4903dc3ba9962c4ece95210eb2cff4  
 ldc2-0.13.0-alpha1-mingw-x86.7z
 a1d0c45d1d46cb4ee9a3856869454891  
 ldc2-0.13.0-alpha1-mingw-x86.zip
 103f59a8f5743a8c5349dd9593a2d3fd  
 ldc2-0.13.0-alpha1-osx-x86_64.tar.gz
 d42390ef6bab21eb634e6ecbb3170fb7  
 ldc2-0.13.0-alpha1-osx-x86_64.tar.xz

 As always, the Win32/MinGW packages require a recent version 
 of the
 mingw-w64 toolchain, see the (new) README file for details.

 There is no Win64/MSVC package because I found a severe bug in 
 the Win64/MSVC
 port. I hope to have this fixed for the alpha2 or beta1 
 release.

 Please be sure to report any bugs at
 https://github.com/ldc-developers/ldc/issues, and feel free to 
 drop by
 at the digitalmars.D.ldc forums
 (http://forum.dlang.org/group/digitalmars.D.ldc) for any 
 questions or
 comments.

 Thanks to everybody involved in making this happen!

 Regards,
 Kai
Feb 02 2014
prev sibling parent reply "Ilya Yaroshenko" <ilyayaroshenko gmail.com> writes:
How I can do auto-vectorization and loopunroling?

There is only -vectorize-slp but no -vectorize.

With
-O3 -release -disable-boundscheck -mcpu=native -vectorize-slp 
-mattr=avx
flags ldc2 produce code without AVX.

On Wednesday, 29 January 2014 at 07:24:16 UTC, Kai Nacke wrote:
 Hi everyone!

 The first alpha release of LDC release 0.13.0 is here! It is 
 based on the 2.064.2 front-end and LLVM 3.1-3.4 (OS X: LLVM 
 3.2/3.4 only).

 Please refer to the GitHub release page for the preliminary 
 change log and the
 package download links:
 https://github.com/ldc-developers/ldc/releases/tag/v0.13.0-alpha1

 Important: This is an alpha version and contains known bugs. Be 
 sure to read the section "Known bugs (release blocker)" in the 
 preliminary change log.

 MD5 checksums for the release packages:

 94d03baa5a48ed43cb3b713a3c9fc99a  ldc-0.13.0-alpha1-src.tar.gz
 60018c5b9cbe27821fcb15a2293479f1  
 ldc2-0.13.0-alpha1-linux-x86.tar.gz
 8c9ab4bde280db84c037cfa7b1144eb8  
 ldc2-0.13.0-alpha1-linux-x86.tar.xz
 f2c464245be4d2a34fcd31ea6e903f9d  
 ldc2-0.13.0-alpha1-linux-x86_64.tar.gz
 6359c030afc6aaf74a3b6c7227d88007  
 ldc2-0.13.0-alpha1-linux-x86_64.tar.xz
 9c4903dc3ba9962c4ece95210eb2cff4  
 ldc2-0.13.0-alpha1-mingw-x86.7z
 a1d0c45d1d46cb4ee9a3856869454891  
 ldc2-0.13.0-alpha1-mingw-x86.zip
 103f59a8f5743a8c5349dd9593a2d3fd  
 ldc2-0.13.0-alpha1-osx-x86_64.tar.gz
 d42390ef6bab21eb634e6ecbb3170fb7  
 ldc2-0.13.0-alpha1-osx-x86_64.tar.xz

 As always, the Win32/MinGW packages require a recent version of 
 the
 mingw-w64 toolchain, see the (new) README file for details.

 There is no Win64/MSVC package because I found a severe bug in 
 the Win64/MSVC
 port. I hope to have this fixed for the alpha2 or beta1 release.

 Please be sure to report any bugs at
 https://github.com/ldc-developers/ldc/issues, and feel free to 
 drop by
 at the digitalmars.D.ldc forums
 (http://forum.dlang.org/group/digitalmars.D.ldc) for any 
 questions or
 comments.

 Thanks to everybody involved in making this happen!

 Regards,
 Kai
Feb 02 2014
parent reply "bearophile" <bearophileHUGS lycos.com> writes:
Ilya Yaroshenko:

 There is only -vectorize-slp but no -vectorize.
Isn't -vectorize implicit in -O3 (Perhaps even in -O2)? Bye, bearophile
Feb 02 2014
next sibling parent "Ilya Yaroshenko" <ilyayaroshenko gmail.com> writes:
On Monday, 3 February 2014 at 00:12:08 UTC, bearophile wrote:
 Ilya Yaroshenko:

 There is only -vectorize-slp but no -vectorize.
Isn't -vectorize implicit in -O3 (Perhaps even in -O2)? Bye, bearophile
No, even with -03 -release =(.
Feb 02 2014
prev sibling parent reply "Ilya Yaroshenko" <ilyayaroshenko gmail.com> writes:
On Monday, 3 February 2014 at 00:12:08 UTC, bearophile wrote:
 Ilya Yaroshenko:

 There is only -vectorize-slp but no -vectorize.
Isn't -vectorize implicit in -O3 (Perhaps even in -O2)? Bye, bearophile
No, even with -03 -release =(. Best Regards, Ilya
Feb 02 2014
parent reply "Kai Nacke" <kai redstar.de> writes:
On Monday, 3 February 2014 at 07:37:50 UTC, Ilya Yaroshenko wrote:
 On Monday, 3 February 2014 at 00:12:08 UTC, bearophile wrote:
 Ilya Yaroshenko:

 There is only -vectorize-slp but no -vectorize.
Isn't -vectorize implicit in -O3 (Perhaps even in -O2)? Bye, bearophile
No, even with -03 -release =(. Best Regards, Ilya
Hi Ilya, your command line looks ok. I think there is a bug in the command line arguments. I try to fix it now. Regards, Kai
Feb 03 2014
parent reply "Kai Nacke" <kai redstar.de> writes:
On Monday, 3 February 2014 at 17:57:50 UTC, Kai Nacke wrote:
 On Monday, 3 February 2014 at 07:37:50 UTC, Ilya Yaroshenko 
 wrote:
 On Monday, 3 February 2014 at 00:12:08 UTC, bearophile wrote:
 Ilya Yaroshenko:

 There is only -vectorize-slp but no -vectorize.
Isn't -vectorize implicit in -O3 (Perhaps even in -O2)? Bye, bearophile
No, even with -03 -release =(. Best Regards, Ilya
Hi Ilya, your command line looks ok. I think there is a bug in the command line arguments. I try to fix it now. Regards, Kai
Is fixed in the merge-2.064 branch and will be in next alpha release. Regards, Kai
Feb 03 2014
next sibling parent "Ilya Yaroshenko" <ilyayaroshenko gmail.com> writes:
Thanks, Kai!
Feb 03 2014
prev sibling parent reply "Ilya Yaroshenko" <ilyayaroshenko gmail.com> writes:
Hi Kai,

It is still does not vectorize with merge-2.064 (merge-2.065)
I use ldc2 -03 -release


ldmd2 output:

LDC - the LLVM D compiler (27c078):
      based on DMD v2.064 and LLVM 3.4
      Default target: x86_64-pc-linux-gnu
      Host CPU: core-avx-i

Examples:
==========================================================
void scale(T)(T[] a, T b)
{
        foreach(ref ae; a)
            ae *= b;
}
==========================================================

.cfi_startproc
	testq	%rdi, %rdi
	je	.LBB7_2
	.align	16, 0x90
.LBB7_1:
	vmulss	(%rsi), %xmm0, %xmm1
	vmovss	%xmm1, (%rsi)
	addq	$4, %rsi
	decq	%rdi
	jne	.LBB7_1
.LBB7_2:
	ret
==========================================================
void substract(T)(T[] c, in T[] a, in T[] b)
{
        foreach(i, ref ce; c)
            ce = a[i]-b[i];
}
==========================================================
.cfi_startproc
	pushq	%rax
.Ltmp33:
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	testq	%r8, %r8
	je	.LBB6_4
	.align	16, 0x90
.LBB6_1:
	cmpq	%rdx, %rax
	jae	.LBB6_5
	cmpq	%rdi, %rax
	jae	.LBB6_5
	vmovsd	(%rcx,%rax,8), %xmm0
	vsubsd	(%rsi,%rax,8), %xmm0, %xmm0
	vmovsd	%xmm0, (%r9,%rax,8)
	incq	%rax
	cmpq	%r8, %rax
	jb	.LBB6_1
.LBB6_4:
	popq	%rax
	ret

==========================================================

Regards,
Ilya

On Tuesday, 4 February 2014 at 06:24:02 UTC, Kai Nacke wrote:
 On Monday, 3 February 2014 at 17:57:50 UTC, Kai Nacke wrote:
 On Monday, 3 February 2014 at 07:37:50 UTC, Ilya Yaroshenko 
 wrote:
 On Monday, 3 February 2014 at 00:12:08 UTC, bearophile wrote:
 Ilya Yaroshenko:

 There is only -vectorize-slp but no -vectorize.
Isn't -vectorize implicit in -O3 (Perhaps even in -O2)? Bye, bearophile
No, even with -03 -release =(. Best Regards, Ilya
Hi Ilya, your command line looks ok. I think there is a bug in the command line arguments. I try to fix it now. Regards, Kai
Is fixed in the merge-2.064 branch and will be in next alpha release. Regards, Kai
Feb 15 2014
next sibling parent "Kai Nacke" <kai redstar.de> writes:
Hi Ilya!

Sorry for the long delay - I was on vacation.
I'll have another look at this. Thanks for the test case.

Regards,
Kai

On Saturday, 15 February 2014 at 20:15:00 UTC, Ilya Yaroshenko 
wrote:
 Hi Kai,

 It is still does not vectorize with merge-2.064 (merge-2.065)
 I use ldc2 -03 -release


 ldmd2 output:

 LDC - the LLVM D compiler (27c078):
      based on DMD v2.064 and LLVM 3.4
      Default target: x86_64-pc-linux-gnu
      Host CPU: core-avx-i

 Examples:
 ==========================================================
 void scale(T)(T[] a, T b)
 {
        foreach(ref ae; a)
            ae *= b;
 }
 ==========================================================

 .cfi_startproc
 	testq	%rdi, %rdi
 	je	.LBB7_2
 	.align	16, 0x90
 .LBB7_1:
 	vmulss	(%rsi), %xmm0, %xmm1
 	vmovss	%xmm1, (%rsi)
 	addq	$4, %rsi
 	decq	%rdi
 	jne	.LBB7_1
 .LBB7_2:
 	ret
 ==========================================================
 void substract(T)(T[] c, in T[] a, in T[] b)
 {
        foreach(i, ref ce; c)
            ce = a[i]-b[i];
 }
 ==========================================================
 .cfi_startproc
 	pushq	%rax
 .Ltmp33:
 	.cfi_def_cfa_offset 16
 	xorl	%eax, %eax
 	testq	%r8, %r8
 	je	.LBB6_4
 	.align	16, 0x90
 .LBB6_1:
 	cmpq	%rdx, %rax
 	jae	.LBB6_5
 	cmpq	%rdi, %rax
 	jae	.LBB6_5
 	vmovsd	(%rcx,%rax,8), %xmm0
 	vsubsd	(%rsi,%rax,8), %xmm0, %xmm0
 	vmovsd	%xmm0, (%r9,%rax,8)
 	incq	%rax
 	cmpq	%r8, %rax
 	jb	.LBB6_1
 .LBB6_4:
 	popq	%rax
 	ret

 ==========================================================

 Regards,
 Ilya

 On Tuesday, 4 February 2014 at 06:24:02 UTC, Kai Nacke wrote:
 On Monday, 3 February 2014 at 17:57:50 UTC, Kai Nacke wrote:
 On Monday, 3 February 2014 at 07:37:50 UTC, Ilya Yaroshenko 
 wrote:
 On Monday, 3 February 2014 at 00:12:08 UTC, bearophile wrote:
 Ilya Yaroshenko:

 There is only -vectorize-slp but no -vectorize.
Isn't -vectorize implicit in -O3 (Perhaps even in -O2)? Bye, bearophile
No, even with -03 -release =(. Best Regards, Ilya
Hi Ilya, your command line looks ok. I think there is a bug in the command line arguments. I try to fix it now. Regards, Kai
Is fixed in the merge-2.064 branch and will be in next alpha release. Regards, Kai
Mar 04 2014
prev sibling parent "Kai Nacke" <kai redstar.de> writes:
Hi Ilya!

On Saturday, 15 February 2014 at 20:15:00 UTC, Ilya Yaroshenko 
wrote:
 Hi Kai,

 It is still does not vectorize with merge-2.064 (merge-2.065)
 I use ldc2 -03 -release
With LLVM 3.5 it should work now. I still need to check if it works with LLVM 3.4, too. Reason is a change in the way the passes are registered. I missed this change. :-( Regards, Kai
Mar 12 2014