Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for mlir #4

Merged
merged 83 commits into from
Jan 26, 2020
Merged

Support for mlir #4

merged 83 commits into from
Jan 26, 2020

Conversation

Robertorosmaninho
Copy link
Owner

No description provided.

Robertorosmaninho and others added 30 commits October 21, 2019 13:44
Add support for ModExp, AndExp, OrExp, XorExp, EqualExp
Able to recognize ifStatments, but the support is not ready yet
Creating temporary variables to measure the efficiency of the translation
Add support other types of code different from funcDeclaration in MLIRGen.cpp
Tentative to support void functions failed!!
Add support to Declarations -> missing specialization to each declaration
Recognising StringExp -> Needs support to translate
Add support to templateInstance
… to update their values

Recognizing and translations PostExp: minusminus and plusplus
Now recognizing assign binOps and translating them as usual binOps
fix typo on mlirGen for ifStatement
fix codeGen for if else if statement
fix ScopeStatment to recognize other statements
…pi from StandardOps

Changing strategy to translate statements: Instead of call the specific translate function, now is you can just call a function with a generic statement and the function will infer the type.
…n MLIR

The Ops of Dialect are written in tablegen style on Ops.td, the declarations and definitions are automatically generated at compile time while building ldc2 using mlir-tblgen binary from MLIR directory.
For now Ops.td only have AddOp as example.
Comment arguments on ForStatement to be generic, a MLIR Pass will be necessary further to place them.
…oat{16, 32, 64 (missing 80)}. Char, strings, null, none... doesn't have support on MLIR yet.
…ike as types of Op instead of each type_size per Op.

OpaqueOperations: Add support to CastExp
…heck

Fix bug with some Assigns declared twice + add more logger information when an assignment occurs.
Updating D Dialect - Milestone 2 and 3 from SAOC 2019
…n get it type.

VarExp now using IntegerOp from D Dialect
PostExp(--, ++) now using AddOp and SubOp from D Dialect instead of its own operations
Add CastOp to D Dialect
Reorganizing some functions
Fix typos on Ops.td
Add REQUIRES flag at if_test.d
IfStatement -> need to be upload to work with ldc last modifications
Fix bug that Return was being written twice -> The blocks are not built sequentially by internal stuff of MLIR, so MLIRGen.cpp:232 wasn't recognizing the ReturnOp already created.
Our new prebuilt LLVM includes the experimental AVR backend (for x86[_64]
packages) as well as a prebuilt Android/AArch64 package.

As the llvm-mirror repos haven't been updated anymore since the end of
October, I transplanted our LLVM/LLD/compiler-rt patches incl. CI/package
generation to a new fork of upstream's mono-repo,
https://github.com/ldc-developers/llvm-project.
kinke and others added 22 commits January 12, 2020 15:49
This reverts commit cbdd22d, because
Phobos' std.format doesn't top-level-import std.math anymore.

tests/PGO/profile_rt_calls.d works for Win32 again, too.
Upgrade frontend & libs to v2.090.0+
…s#3259)

Resolves ldc-developers#3245 by adding `pragma(lib, <name>)` library names to
`llvm.dependent-libraries` for ELF object files.

For Mach-O, embed appropriate linker options for `pragma(lib)` and
support generic `pragma(linkerDirective, <flag>, ...)` as well.
…Expression::is<ExpressionType> (ldc-developers#3141)

This may negatively impact performance, as the (final, i.e.,
non-virtual) Expression::is... family is implemented in D and not
available inline in the C++ headers.
…D flags (ldc-developers#3278)

... instead of overriding them, which is problematic due to the defaults
changing over time (e.g., the testrunners require -dip1000...). Introduce
a new `D_EXTRA_FLAGS` CMake variable for that purpose.

Also remove --targetPreset; it can still be set manually as any other
CMake variable, and I'm more fond of a manual approach for Android
targets, using the NDK's CMake toolchain file as illustrated by
https://wiki.dlang.org/Building_LDC_runtime_libraries.
…evelopers#3282)

Fixes an annoyance reported in ldc-developers#3281, affecting non-LLD-enabled builds
as well as linker invocations involving LTO.
Debian moved to minor-versioness llvm-config-7 instead of llvm-config-7.0, same for 8 and 9 (and in the future 10)
Update FindLLVM.cmake to cope with new llvm-config names
Missing Support for Struct translation
Add new Cast support
Add String as OpaqueOperation of type tensor<*xi8>
Updating master with updates from LDC/master
Merging updates from Milestone 3 - Support for translation into Standard Dialect
@Robertorosmaninho Robertorosmaninho merged commit 5915c52 into master Jan 26, 2020
Robertorosmaninho added a commit that referenced this pull request Feb 7, 2020
Robertorosmaninho added a commit that referenced this pull request Feb 7, 2020
Robertorosmaninho added a commit that referenced this pull request Feb 7, 2020
Robertorosmaninho added a commit that referenced this pull request Feb 7, 2020
Robertorosmaninho added a commit that referenced this pull request Feb 12, 2020
MLIR: #2 CMake - Adding FindMLIR.cmake
MLIR: #3 CMake - Updating FindMLIR
MLIR: #4 CMake - Updating Path 
MLIR: #5 CMake - Adding MLIRLibs
MLIR: #6 CMake - Supporting Dialect on FindMLIR
MLIR: #7 CMake - Adding Message of Ops.ts
MLIR: ldc-developers#8 CMake - Removing duplicated messages
MLIR: ldc-developers#9 CMake: Updating paths and setting libs
MLIR: ldc-developers#10 CMake - Removing duplicated MLIR Headers
Make MLIR optional, use MLIR_LIBRARIES
Robertorosmaninho added a commit that referenced this pull request Feb 15, 2020
MLIR: #1 Introduce MLIRGen - The main component to translation
MLIR: #2 Introduce MLIRGen - Recoganize the BinOps and Translations of it 
MLIR: #3 Code Refactorig - Introducing MLIRStatement and MLIRDeclaration
MLIR: #4 Doing de code generation of a function body on the right way using func->fbody instead of vectors of statements
MLIR: #5 Add function calls support and add static declaration of arrays support -> one-dimensional tensors
MLIR: #6 Add #ifdef to compile MLIR files only if LDC_MLIR_ENABLED is ON
MLIR: #7 Modifications on TensorType
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants