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

Duncan Sands baldrick at free.fr
Thu Jul 1 06:34:05 PDT 2010


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.

Ciao,

Duncan.



More information about the llvm-commits mailing list