mlir icon indicating copy to clipboard operation
mlir copied to clipboard

Identified structs

Open schweitzpgi opened this issue 5 years ago • 3 comments

Add constructors for LLVM identified struct types. This is to support recursive type references. The interface follows that found in LLVM:;StructType's public interface with create and setBody functions.

The test for this is commented out because roundtripping does not work. However, using the interface does generate the expected LLVM code.

schweitzpgi avatar Oct 24 '19 21:10 schweitzpgi

What specifically does not work with roundtripping? Is it the parser?

ftynse avatar Oct 29 '19 16:10 ftynse

@ftynse yes, we can't use the standard LLVM type parser to support named structs. It relies on the fact that the struct types have already been printed/parsed and elides the body. To support these we will likely need to re-implement the parser in MLIR that supports inline parsing/printing.

River707 avatar Oct 29 '19 16:10 River707

What specifically does not work with roundtripping? Is it the parser?

To echo River's response, yes, the problem is with the parser.

schweitzpgi avatar Nov 04 '19 21:11 schweitzpgi