Here is one idea for fixing Andersen’s problem with getElementPtr : just create new separate objects for each array element and each field in struct when creating an object of a struct or an array. But this idea is not flawless since: struct and arrays may be really big (in term of number of fields and elements). remember that struct may have fields with type of another struct and making separate object for each field is costly.
one good solution for the problem that since we are just treating getElementPtrs with constant indices, we can create separate objects just for areas that are accesses. not all the areas.
Here is one idea for fixing Andersen’s problem with getElementPtr : just create new separate objects for each array element and each field in struct when creating an object of a struct or an array. But this idea is not flawless since: struct and arrays may be really big (in term of number of fields and elements). remember that struct may have fields with type of another struct and making separate object for each field is costly. one good solution for the problem that since we are just treating getElementPtrs with constant indices, we can create separate objects just for areas that are accesses. not all the areas.