libmir/mir-glas

2 x slower with LLVM 4.X - 5.X

9il opened this issue · 12 comments

9il commented

LLVM 4.0, avx512f has the same issue as LLVM 4.0, broadwell.

LDC - the LLVM D compiler (1.1.1):
  based on DMD v2.071.2 and LLVM 4.0.0
  built with LDC - the LLVM D compiler (0.17.3)
  Default target: x86_64-apple-darwin16.4.0
  Host CPU: haswell
  http://dlang.org - http://wiki.dlang.org/LDC

vs

LDC - the LLVM D compiler (1.1.1):
  based on DMD v2.071.2 and LLVM 3.9.1
  built with LDC - the LLVM D compiler (1.1.1)
  Default target: x86_64-apple-darwin16.4.0
  Host CPU: haswell
  http://dlang.org - http://wiki.dlang.org/LDC

Could you spend some time on minimizing this? Thanks!

9il commented

Could you spend some time on minimizing this? Thanks!

Done, please see gists list in the issue.

@9il: What would probably be most useful is to generate the LLVM IR for the kernel function (-output-ll) and post it at bugs.llvm.org together with the assembler listings, possibly CCing some of the people who have worked on x86 codegen before (if you happen to know someone). Am I correct in the assumption that simple is just a manually expanded version of generic?

9il commented

Am I correct in the assumption that simple is just a manually expanded version of generic?

Yes.

9il commented

I have requested account at bugs.llvm.org

Okay, thanks. If there are any issues with the account, I can also make the report for you.

Any update on this? And does LLVM 4.0 only decrease performance on your code or are there improvements as well? We'll have to decide on the compiler to use to ship the pre-built 1.2 binaries soon.

9il commented

Only LLVM 4.0 has no bad AVX512 support. Feel free to update compiler to the LLVM 4.0. GLAS is not completely implemented for BLAS API. I will fill the issue and send link to the LDC gitter

Any news on whether v4.0.1 or v5.0.0 fix this?

9il commented

I can not compile LDC with LLVM 5.0 on macos

@9il: See Gitter – you might need to turn off detection of LLD headers explicitly with LLVM 5.0 until this is fixed.

9il commented

Any news on whether v4.0.1 or v5.0.0 fix this?

It is not fixed in v5.0