Is there any frontend that will generate MLIR (not LLVM) code currently? I am interested in parsing C/C++ or Java code in particular. Does clang support this now? This page doesn't list any at the moment.
Is there any frontend that will generate MLIR (not LLVM) code currently? I am interested in parsing C/C++ or Java code in particular. Does clang support this now? This page doesn't list any at the moment.
As of Oct 2020, compiling C++ into CIL (C intermediate language) mlir dialect is not public yet. But they will be making it available "soon".
This was hinted on this year on LLVM developers meeting (http://llvm.org/devmtg/2020-09/program/) on the following talk:
In case people are not aware, as an alternative if you just want your C/C++ code in the mlir environment is to compile your program into LLVM with clang -S -fno-discard-value-names -emit-llvm and then later use mlir-translate --import-llvm to transform your .ll file into a .mlir file. But you do lose some higher level information and the opportunity for higher level optimizations.