[llvm-commits] [PATCH (need approval)] Add support for InsertValue and ExtractValue to gep_type_iterator

Peter Collingbourne peter at pcc.me.uk
Thu Jul 1 06:22:30 PDT 2010


On Thu, Jul 01, 2010 at 01:50:37PM +0200, Duncan Sands wrote:
> Hi Peter,
> 
> > In another project (Klee) we needed to extend a procedure that
> > enumerated the types of a GEP to handle InsertValue and ExtractValue
> > (this procedure calculates the byte offset of the indices).
> 
> are you saying that you want to calculate the memory offset for an
> InsertValue or ExtractValue?  If so, this doesn't make much sense
> to me: these are registers, there is no memory involved.

Hi Duncan,

Klee represents each register as a bit vector -- this includes any
type of register, including exotic ones such as structs.  We needed
to be able to calculate an offset into this bit vector to implement
InsertValue and ExtractValue.  I would imagine that other (concrete
or symbolic) interpreters could be implemented in a similar way.

Thanks,
-- 
Peter



More information about the llvm-commits mailing list