<div dir="ltr"><div>Hi,</div><div>as I wrote in mu previous post I wanted to somehow mark one IR instruction (in this particular case it would be 'load') during dedicated pass, which will set the marking based on neighboring instructions. Next I wanted to somehow to convey this marking from 'load' IR instruction to 'load' SDNode in order to use it during DAG Instruction Selection - information stored in this marking would 'enable' or 'disable' particular pattern... I was thinking about usage metadata for it, but I didn't get any feedback. <br></div><div>So now I'm wondering if solution with metadata is the best one or it maybe it doesn't make any sense an something else would be better.<br></div><div><br></div><div>I don't have big experience with metadata, but what I've read it would allow for customizing IR instruction without modifying the instruction. Or maybe I'm unnecessarily thinking about metadata, because 'load' instruction has already some fields which could be used for storing 'flags', which might represent any custom information. Obviously I don't want to modify 'load'.<br></div><div>
Any suggestions? <br></div><div><br></div><div>Thanks,</div><div>Przemek<br></div><div> <br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Apr 25, 2019 at 11:54 AM Przemyslaw Ossowski <<a href="mailto:przemyslaw.ossowski@googlemail.com">przemyslaw.ossowski@googlemail.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 dir="ltr">
<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif">Hello,<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif"><span> </span></p>
<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif">I’m looking for the best approach which would allow for marking
given LLVM IR instruction during IR custom pass and later utilizing that
information during DAG Instruction Selection in order to match given pattern
based on this marking.<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif"><span> </span></p>
<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif">I’m wondering if marking IR instruction utilizing Metadata
is good idea.<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif">But how later pass that information to DAG and appropriately
mark in DAGBuilder SDNode, which represents the earlier marked instruction in
IR?<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif"><span> </span></p>
<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif">Any suggestion how to implement the most efficiently?<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif">I’m expecting there are already similar solutions – maybe someone
would be able to indicate the exact example?<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif"><span> </span></p>
<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif">Thanks in advance,<span></span></p>
<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:11pt;font-family:"Calibri",sans-serif">Przemek<span></span></p>
</div>
</blockquote></div>