[SAoC] MLIR Support for LDC

Roberto Rosmaninho Robertogrosmaninho at gmail.com
Wed Nov 20 12:54:30 UTC 2019


Hi everyone, here I know that I'm not writing for a while and I 
apologize for that, but here it's what I've been working on the 
past few weeks:

  - Add the notion of blocks and control flow: Support to 
IfStatement and ForStatement
  - Add support to fill different blocks
  - Refactoring of MLIRDeclaration to infer the type of each 
declaration as is used on MLIRStatement
  - Support for Template Interface
  - Improving on AssignExp
  - Support for PostExp: MinusMinus and PlusPlus
  - Support for Assign Bin Ops
  - Introduction to D Dialect: Creation of Dialect Class
  - Dialect Registration
  - Creation of Ops.td a file written in mlir-tablegen style 
(ODS[1]) to define Ops on D Dialect, for now only AddExp and 
MulExp are implemented for int{8,16,32,64} and float{16,32,64} 
types
  - Support to bool, float and different sizes of int on the 
entire project, other types depend on the creation of new types, 
MLIR doesn't support char, null, none by default.

Hopefully, I'll finish writing the Ops.td until next week, then 
I'll try to build my first MLIR pass to improve ForStatement with 
arguments on the block which replace the phi functions of LLVM.

Suggestions, ideas, and code reviews are more than welcome!
[1]Table-driven Operation Definition Specification (ODS) - 
https://github.com/tensorflow/mlir/blob/master/g3doc/OpDefinitions.md#table-driven-operation-definition-specification-ods

GitHub of the project: 
https://github.com/Robertorosmaninho/ldc/tree/fix-llvm-10

Thanks for your attention,
Roberto Rosmaninho


More information about the Digitalmars-d mailing list