<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jun 21, 2021 at 3:27 PM Kaylor, Andrew <<a href="mailto:andrew.kaylor@intel.com" target="_blank">andrew.kaylor@intel.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div lang="EN-US">
<div>
<p class="MsoNormal">This has probably been discussed somewhere, but I missed it. Can you elaborate a bit on this?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<ul style="margin-top:0in" type="disc">
<li class="MsoNormal" style="color:rgb(36,41,46);margin-top:3pt;background:white">
<span style="font-size:12pt;font-family:-apple-system">Allow bitcode auto-upgrade of legacy pointer type to the new opaque pointer type (not to be turned on until ready)<u></u><u></u></span></li><ul type="circle">
<li class="MsoNormal" style="color:rgb(36,41,46);background:white">
<span style="font-size:12pt;font-family:-apple-system">To support legacy bitcode, such as legacy stores/loads, we need to track pointee types for all values since legacy instructions may infer the types from a pointer operand's pointee type<u></u><u></u></span></li></ul>
</ul>
<p class="MsoNormal">I‘m specifically trying to understand what will happen when typed pointer support is removed. How will IR with typed pointers be auto-upgraded to pure opaque pointer IR? Will the bitcode reader keep some level of typed pointer support indefinitely?</p></div></div></blockquote><div>Yes, the plan is something along the lines of associating each Value with a possible pointee type inside the bitcode reader.</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div lang="EN-US"><div><p class="MsoNormal"><u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Also, do you have a plan for replacing intrinsics that currently rely on pointee types? For example, the load instruction was updated to take an explicit type operand but I don’t think we can do the same thing for an intrinsic like llvm.masked.load
 since there is Value for Type. This is an easy problem to work around for something like masked.load, but more complicated if anyone has a downstream GEP-like intrinsic that needs more than the size of an element (spoiler alert: I do have such an intrinsic).
 Would you use a metadata argument?</p></div></div></blockquote><div>I don't think metadata can reference an LLVM type. My previous hacky suggestion was to add a new overloaded parameter with the type you want and pass undef/poison to it. In any case, we'll have to find a way to fix these sorts of intrinsics, we shouldn't block the opaque pointers project on some intrinsics.</div><div><br></div><div>LLVM already (mostly) treats memory as untyped, what is your intrinsic attempting to do?<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div lang="EN-US"><div><div><div><div>
</div>
</div>
</div>
</div>
</div>

</blockquote></div></div>