[SAoC] MLIR Support for LDC

Roberto Rosmaninho Robertogrosmaninho at gmail.com
Wed Oct 2 18:43:14 UTC 2019


Hi everyone,
I'm here just to report the status of my project on its second 
week:

  - I Read all documentation from MLIR
  - I Started to implement mlirstate.h and mlirstate.cpp
  - I Started to implement mlircodegenerator.h 
mlircodegenerator.cpp

The main issue that I stuck this week was to compile ldc with my 
modifications due to problems with mlir headers and dmd/globals.h.
So I had these 2 questions and I hope someone could help me:

  - What is the best way to refer mlir (a project inside llvm, 
like clang) into ldc CMakeLists.txt? I need the headers provided 
by this project to write my codes.

  - I'm trying to do the same things that ldc does to get LLVM IR, 
so I tried to create a "DArray<const char> mlir_ext;" in 
dmd/globals.h:296, but when I compile ldc with -vv it stops at " 
Targeting 'x86_64-apple-macosx' (CPU 'core2' with features '') " 
and tell me that the process finished with exit code 1. How can I 
fix this? And if I'm doing something wrong, what is the best way 
to get these variables for ldc and what is its function on the 
program? I thought it was setting the file extension, but I'm not 
sure.

Regards,
Roberto Rosmaninho


More information about the Digitalmars-d mailing list