arcana-lab / memoir

A case for representing data collections and objects in the LLVM IR
MIT License
11 stars 2 forks source link

Possible Nested Reference Struct Type Analysis Bug #54

Closed peteryongzhong closed 1 year ago

peteryongzhong commented 1 year ago

I am running commit : e0c6536d7f7cf49df89b0413b0ce63b7f33afb96. In particular the test function https://github.com/arcana-lab/memoir/blob/e0c6536d7f7cf49df89b0413b0ce63b7f33afb96/compiler/passes/object_lowering/src/ObjectLowering.cpp#L34

On test struct_ref

It would appear an error is thrown when attempting to get the type of the struct accessed for a struct write instruction that write to a nested (by reference) struct.

tommymcm commented 1 year ago

This is because the CollectionAnalysis for field arrays is not yet implemented. I will make a quick fix for this that should unblock you, but will need to be fixed when we need to do reordering, etc. of struct fields.

tommymcm commented 1 year ago

Pushed a possible fix for this bug: 43969b36639c52a0e04e6ba8d458a562275ed587

Please test and let me know.