[LLVMdev] Number of Bytes a GetElementPtr .
baldrick at free.fr
Tue Apr 20 00:06:14 PDT 2010
> I have the value of a getelementptr instruction. How can i find how
> many bytes it is accessing from the base address. I need this to call
> the alias method.
you can find code doing this in lots of places. For example, take a
look at lines 205-220 in lib/Analysis/ConstantFolding.cpp, starting
// Otherwise, add any offset that our operands provide.
More information about the llvm-dev