[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 07:44:07 PDT 2010


On Thu, Jul 01, 2010 at 03:34:05PM +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.
>
> if I understand right, Klee has chosen a particular way of representing these
> registers, and you are suggesting a gep_type_iterator enhancement which only
> makes sense when Klee's particular representation is used.  If so, I think it
> is best if it stays in Klee.

Ok, I'll add this to Klee.

Thanks,
-- 
Peter



More information about the llvm-commits mailing list