[RFC] Replacing getelementptr with ptradd

It seems that the conversions of Geps with struct types are now converted
to Geps of i8 types as shown below,

For a high-level structure

struct Node1
{
int data;
long data1;
struct Node1 *next;
};

  1. The new IR would not contain

    %struct.Node1 = type { i32, i64, ptr }

which means that there would be no data type of any struct present in IR

  1. StructPtr->data1 was earlier generating Geps like

    %38 = getelementptr inbounds %struct.Node1, ptr %32, i64 0, i32 1

    now generates

    %35 = getelementptr inbounds i8, ptr %30, i64 8

 StructPtr++ was earlier generating Geps like

 %58 = getelementptr inbounds %struct.Node1, ptr %51, i64 1

 now generates 

 %37 = getelementptr inbounds i8, ptr %30, i64 24

Can you please let me know if there is any analysis, feature, or meta data from the front end which could help us decipher the data type associated with a pointer in the Gep instruction.

Thanks!!!