[llvm-dev] getelementptr
David Chisnall via llvm-dev
llvm-dev at lists.llvm.org
Fri Sep 1 03:50:10 PDT 2017
On 1 Sep 2017, at 11:44, Anastasiya Ruzhanskaya via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
> Hello,
> I wonder if the getelementptr can have other successors than load, store in some other cases when I directly print or directly return the result. every time I would like to assign the result - it will have a load/store successor?
> So, basically the overall question is to clarify the possible successors of getelementptr.
Any instruction that may take a pointer operand might be a user of a GEP. For example, consider this C function:
int x(struct S *s)
{
y(&s->field);
}
Here, there will be a GEP to get the address of the field and then the user will be a call (or possibly invoke) instruction.
David
More information about the llvm-dev
mailing list