Polygeist
Polygeist copied to clipboard
Use higher level types to represent classes
Instead of using LLVMStructType
, use a higher level Polygeist-specific type to represent classes holding more information (in addition to member), e.g., class name.
This would allow for easier handling in other dialects depending on Polygeist, e.g., conversion to dialect-specific types; without including further modifications in the Polygeist code.
E.g.,
namespace ns {
namespace impl {
class A { int m; };
}
class B { A n; };
}
could be represented as:
<ns::impl::A, i32>
<ns::B, <ns::impl::A, i32>>
This would allow a dialect Foo to represent the B
class as, e.g.:
<B>
just by reading the namespace-qualified type name.,
Completely agreed. Want to take a first stab at it?
Hi, @wsmoses,
We have this in our task list, but, as this is not in our critical path, we will wait for now. However, we have discussed this and agreed we won't make this part of the polygeist
dialect, but of a different dialect which could be used here.