<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 16 April 2017 at 22:24, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@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"><br><br><div class="gmail_quote"><span class=""><div dir="ltr">On Sun, Apr 16, 2017 at 2:34 AM James Courtier-Dutton via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hi,<br><br></div>Did this work ever get done? There was a long thread about it back in 2015.<br><br></div>I wish to use IRBuilder.<br></div><div>Is there any documentation?<br></div><div>How do I use the singular pointer type in GEP, LOAD, STORE instructions?<br></div></div></blockquote></span><div><br>Sorry, no, the work is not complete - for now you'll need to pass the pointer and pointee type to a few of these functions and some will do it for you (Getting the pointee type from the pointer type, etc). I'll hopefully be coming back around to this in 6-9 months to continue on it (finishing off one or two IR constructs, then making sure all the optimizations can cope with this)<br><br>- Dave<br></div></div></div></blockquote></div><br></div><div class="gmail_extra">Hi Dave,<br><br></div><div class="gmail_extra">I think if the optimizations changed from the concept of the pointer having a type, to instead the memory location itself having the type. Then we might make some good progress in improving the optimizations.<br></div><div class="gmail_extra">If one has the concept of the memory location itself having a type, it is then obvious that any GEP operation is likely to result in a pointer to a different memory location, and therefore have a different type. So, giving a pointer a type is not particularly useful.<br></div><div class="gmail_extra">If the pointer having a type is useful in some way to optimizations, then the GEP instruction should really be a combined GEP and BITCAST instruction.<br></div><div class="gmail_extra"><br>The singular pointer type (i.e. type-less) goes some way towards achieving this.<br><br></div><div class="gmail_extra">Kind Regards<br><br><br></div><div class="gmail_extra">James<br>  <br></div><div class="gmail_extra"><br></div></div>