<div dir="ltr">Hi all,<div><br></div><div>An oddity that has existed for a long time in the IR is that PointerType derives from SequentialType. Per subject I propose to make PointerType derive from Type for a couple of reasons:</div><div><br></div><div>- Values of type PointerType are unlike the other SequentialTypes (arrays and vectors) in that they do not hold values of the element type. By moving PointerType we can unify certain aspects of how the other SequentialTypes are handled.</div><div>- PointerType will have no place in the SequentialType hierarchy once pointee types are removed, so this is a necessary step towards removing pointee types.</div><div><br></div><div>Although this would slightly complicate GEP enumeration, this can be handled at the API level and is also inevitable given the move to remove pointee types.</div><div><br></div><div>Specifically I want to change the API exposed by the GEP type iterator so that each iterator can be in one of three states: unbounded array (i.e. the existing PointerType state, which would represent the first "element" of the GEP), bounded array (the existing ArrayType state) or struct (the existing StructType state). In the former two cases clients would not have access to the "underlying" type and would only be able to access the "boundedness", the upper bound if any and the element type.</div><div><br></div><div>Thanks,<br>-- <br><div class="gmail_signature"><div dir="ltr">-- <div>Peter</div></div></div>
</div></div>