Skip to content
This repository has been archived by the owner on Apr 23, 2021. It is now read-only.

Identified structs #209

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

schweitzpgi
Copy link
Contributor

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.

@ftynse
Copy link
Contributor

ftynse commented Oct 29, 2019

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

@River707
Copy link
Contributor

@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.

@schweitzpgi
Copy link
Contributor Author

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

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants