<div dir="ltr">Actually, store doesn't need a type, as that's supplied by the value being stored. But load needs to know the type of the loaded value, and gep needs to know the memory layout to perform target specific offset calculations.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Feb 7, 2015 at 10:51 AM, Jeremy Lakeman <span dir="ltr"><<a href="mailto:Jeremy.Lakeman@gmail.com" target="_blank">Jeremy.Lakeman@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>The difference is that %x would be just a generic pointer type, but the type would still need to be supplied as an argument to the GEP / load / store.<br><br>%inner.ptr = getelementptr i8**, %x, i32 1<br><br></div>You could think of it as having an implicit bitcast on every pointer operation.<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Feb 7, 2015 at 10:42 AM, Sanjoy Das <span dir="ltr"><<a href="mailto:sanjoy@playingwithpointers.com" target="_blank">sanjoy@playingwithpointers.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">How would GEP's look like in this scheme?  Concretely, what would be<br>
the equivalent of<br>
<br>
%inner.ptr = getelementptr i8** %x, i32 1<br>
<br>
assuming we're doing target independent optimizations and do not know<br>
the size of a pointer?<br>
<br>
-- Sanjoy<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>