You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to create a full C-to-DCIR optimization pipeline with llvm/Polygeist and sdfg-opt, but it doesn't look like sdfg-opt recognizes the llvm dialect, which is a fundamental requirement of C-style strings.
main.s:11:10: error: failed to legalize operation 'llvm.mlir.addressof'
%0 = llvm.mlir.addressof @str0 : !llvm.ptr<array<4 x i8>>
^
main.s:11:10: note: see current operation: %12 = "llvm.mlir.addressof"() {global_name = @str0} : () -> !llvm.ptr<array<4 x i8>>
As far as I understand, without recognizing the llvm dialect, it's impossible to use any C string which is often mandatory for any serialized input/output in a complete program.
Will any support be added for this?
The text was updated successfully, but these errors were encountered:
We are indeed working on an experimental llvm dialect integration. In fact we had the same issues with printf as you describe.
Our temporary hack was to have a case distinction in the converter for llvm.call @printf to convert it into an annotated tasklet.
The main issue is that splitting up llvm operations into individual tasklets is really inefficient for printing. Ideally we would like to group them together, but recognizing which operations to group is not trivial.
Currently we suggest avoiding any I/O and using DCIR for numerical optimizations. As you have already identified, this requires wrapper code to run the SDFG.
I am trying to create a full C-to-DCIR optimization pipeline with llvm/Polygeist and
sdfg-opt
, but it doesn't look likesdfg-opt
recognizes thellvm
dialect, which is a fundamental requirement of C-style strings.Reproduction steps
Use the following C source as the ultimate input:
Compile into MLIR using
cgeist
:The resulting
main.s
file has the following content:Attempt to run
sdfg-opt
overmain.s
:The following error is produced:
As far as I understand, without recognizing the
llvm
dialect, it's impossible to use any C string which is often mandatory for any serialized input/output in a complete program.Will any support be added for this?
The text was updated successfully, but these errors were encountered: