[LLVMdev] Two new 'llvmnotes'
sabre at nondot.org
Sun Apr 27 15:57:30 PDT 2008
On Apr 27, 2008, at 2:59 PM, Gordon Henriksen wrote:
>> Vector insert/extract element take (potentially variable) Value*'s
>> for the index and only allows one index. Aggregate get/set take
>> constants and are variadic.
> Forbidding variable indices for arrays would seem to rather reduce
> their utility (precisely to that of a homogenous struct). Granted,
> lowering makes updating an indexed value much uglier, but it would
> seem to be an already-solved problem for vector lowering. Is it
> completely impractical to use the same rule as GEP?
If you have variable indices, you can't trivially scalarize them. If
you need variable indices, memory is still available. In practice,
arrays as first-class aggregates probably won't be very useful, but
are good to include for orthogonality.
More information about the llvm-dev