Polygeist icon indicating copy to clipboard operation
Polygeist copied to clipboard

Use higher level types to represent classes

Open victor-eds opened this issue 2 years ago • 2 comments

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

victor-eds avatar Jul 25 '22 14:07 victor-eds

Completely agreed. Want to take a first stab at it?

wsmoses avatar Dec 27 '22 08:12 wsmoses

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.

victor-eds avatar Jan 06 '23 15:01 victor-eds