[LLVMdev] Creating a GEP instruction.
rgoparaj at umail.iu.edu
Sun Apr 25 20:37:45 PDT 2010
Thanks. The problem i'm facing is i want to get the address of the first
element of an array and i have also tried using the createInBoundsGEP which
takes the base pointer and the index value and a name. When i try passing
'0' as the index im running into problems.
On Sun, Apr 25, 2010 at 10:27 PM, Eli Friedman <eli.friedman at gmail.com>wrote:
> On Sun, Apr 25, 2010 at 5:15 PM, Rohith Goparaju <rgoparaj at umail.iu.edu>
> > Hi,
> > I'm trying to create a GEP (inbounds) instruction . I was looking at
> > createinboundsGEP method . I didnt get the inputiterator part. My
> > how do i create a GEP instruction and what do i pass for the input
> > arguments.
> Generic answer to "how do I create an X instruction": use llc
> -march=cpp on an IR file containing the instruction, and read the
> For this particular question, the simplest way to get appropriate
> iterators is to put the indices into an std::vector and pass in the
> .begin() and .end() of it.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev