On 6/20/19 9:37 AM, Richard Biener wrote:
I've spent some thoughts on this and I wonder whether we can re-implement classtype-as-base with fake inheritance (which would also solve the TBAA alias set issue in a natural way). That is, we'd lay out structs as-base and make instances of it use aclass as-instance { as-base b; X pad1; Y pad2; }; with either explicit padding fields or with implicit ones (I didn't check how we trick stor-layout to not pad the as-base type to its natural alignment...).
I think you might end up with unordered fields? virtual empty bases don't appear in the as-base variant, and I think they could appear in the middle of the as-instance variant. that might or might not be a problem?
nathan -- Nathan Sidwell
