[LLVMdev] byval in a world without pointee types
Reid Kleckner
rnk at google.com
Mon Mar 9 13:23:43 PDT 2015
On Mon, Mar 9, 2015 at 12:58 PM, David Blaikie <dblaikie at gmail.com> wrote:
> On Mon, Mar 9, 2015 at 12:38 PM, Reid Kleckner <rnk at google.com> wrote:
>
>> If we're keeping types on GEP,
>>
>
> You mean rather than just dropping gep entirely & doing manual pointer
> arithmetic? (& moving inbounds to an attribute on pointer addition, I
> guess?)
>
Yep. If we're keeping the GEP sugar to say, "hey this pointer arithmetic is
actually trying to access field #4", then we should keep the allocation
sugar that says "these 4 bytes are (usually) an i32."
then IMO we should keep them on allocas and globals. It keeps the IR human
>> readable.
>>
>
> & what of byval, then? Do you agree with Chandler's argument from analogy
> between byval, alloca, and globals?
>
> (oh, and I should look at inalloca a bit too - it looks like it uses the getByValTypeAlignment
> too... )
>
byval and inalloca are edge cases where we can afford to sacrifice some
readability.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150309/95b6d1f2/attachment.html>
More information about the llvm-dev
mailing list