<div dir="ltr"><br><br><div class="gmail_quote"><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">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><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><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>Kind Regards<br><br>James<br><br></div><span class="m_3210931606357537655m_4808734376903082660gmail-HOEnZb m_3210931606357537655m_4808734376903082660gmail-adL"></span></div><div class="gmail_extra"><div class="gmail_quote">On 6 February 2015 at 23:38, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>></span> wrote:<br></div></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">It's an idea been thrown around in a few different threads (including Rafael's recent <a href="http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20141201/247285.html" target="_blank">http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20141201/247285.html</a> and Chandler's <a href="http://llvm.org/viewvc/llvm-project?rev=226781&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=226781&view=rev</a> ) so I'm putting up my hand to volunteer to do the work & interested in getting a bit more feedback, thoughts on best approaches, timing, etc.<br><br>For some more detail: pointer types (i32*, %foo*, etc) complicate IR canonicalization. store + load should be the same instructions given the same number of bytes stored to memory, but instead we can have store float, store int, etc, etc. Another point Chandler made was that the bitcasts involved when a pointer isn't of the right type results in extra IR instructions we don't really need.<br><br>So the general idea is that all pointers would just be called "ptr" (pointer? void*?).<br><br>Is this something everyone feels is the right direction? Any reason why it wouldn't be?<br><br>Beyond that, I'm trying to think about how to do this & I haven't hit on a terribly convincing way to do this incrementally. I could introduce the alternative form of "store" that provides the magic pointer type, then set about adding overloads (is that possible?) of any instruction consuming a pointer type, writing the usual LLVM regression tests as I go. Eventually, once this looks like it's functioning, I could start porting IRbuilder and Clang over to the new store operations & other sources of pointers. Then remove the old stuff.<br><br>Are IR instructions overloadable like this? If not, would it be worthwhile to introduce separate names for the typeless-pointer forms (gep_ptr, store_ptr, etc) as a temporary means to have both sets of semantics then rename them all back once the old ones are removed?<br><br>Other ideas/thoughts?<span class="m_3210931606357537655HOEnZb"><font color="#888888"><br><br>- David</font></span></div>
<br></blockquote></div></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">_______________________________________________<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" rel="noreferrer" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" rel="noreferrer" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br></blockquote></div></div>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div></div>