Hi, I want to for every pointer in a program append another pointer associated with it.
Eg. If the program has, char *p; I want this to be transformed into, char *pa; char *p such that, (&p)-4 is same as &(pa). I am only aware I can insert temporary variables in the gcc gimple pass. But the order of the temporary variables are moved around are not guaranteed to stay in the same location. This made me think I will need to wrap them into a struct or something so every pointer declaration is replaced with a struct with a associated pointer and the original pointer. But this means, I need to overwrite the entire program replacing all pointer accesses by the corresponding pointer in the struct. Is this is the only way it can be done ? Or can I have (non-temporary)variables inserted whos order can be preserved always ? Thanks, Aravinda