[LLVMdev] const indices of extractvalue

Jianzhou Zhao jianzhou at seas.upenn.edu
Tue Jul 13 07:44:30 PDT 2010


Hi,

The 'extractvalue' and 'insertvalue' instructions only allow constant
indices.  If I have an array with variable indices,  I need to store
it into memory, and then load its sub-elements via GEP. Why could
'extractvalue' not support variable indices like GEP? In general, in
which case should source code be translated into 'extractvalue' , and
when should frontends use GEP for aggregate data?

Thanks.
-- 
Jianzhou



More information about the llvm-dev mailing list