[SAoC] MLIR Support for LDC

Roberto Rosmaninho Robertogrosmaninho at gmail.com
Wed Oct 2 23:45:03 UTC 2019

On Wednesday, 2 October 2019 at 20:31:02 UTC, Johan Engelen wrote:
> As far as I can tell, if you checkout MLIR into your local LLVM 
> checkout [1], then it is automatically built with LLVM and the 
> header files will be part of the LLVM install.

Yes! I found a solution: create a cmake find for mlir, ldc have 
to mlir and it fixes the problem: http://bit.ly/2n7xEJS

> globals.h _must exactly_ match with globals.d and there is no 
> tool that will check that for you ('.h' is used by the C++ 
> compiler, '.d' by the D compiler and they don't talk to each 
> other). One way to look at it is that `globals.d` is the `.cpp` 
> file belonging to `globals.h`.
> For your particular issue: is you add `mlir_ext` to 
> `globals.h`, you have to add it to `globals.d` in _exactly the 
> same_ location in the `Global` struct.

Works here! Thanks!!

> Do you aim to take a similar approach as the SPIR-V/dcompute 
> mechanism?

I'm new to ecosystem D, so I don't know these approaches in D, do 
you mind explaining me about it or giving me a guide to study?

Best regards,
Roberto Rosmaninho

More information about the Digitalmars-d mailing list