<div dir="ltr"><div>I have one more question regarding expanding pseudo instruction.</div><div><br></div><div>These two Machine Instructions, which I mentioned earlier, have to be one after another, but also have to 'communicate' using any General Purpose Register <br></div><div><br></div><div>For example:<br></div><div></div><div><b>gpr4</b> INST_IN <br></div><div>r2 INST_OUT <b>gpr4</b>, r1<br></div><div><br></div><div>Is there any possibility to indicate that pseudo instruction, which is representing these two instruction,</div><div> will define and use 'internally' one additional register from '<b>gpr</b>' pool (except those which are ins and outs). <br></div><div>Aa 'internal' register there might be use any of the register from 'gpr' pool. I wouldn't like to indicate particular one.<br></div><div><br></div><div>Expanding will occur after register allocation, so the only solution I see is involving register scavenger during expanding pass.</div><div>Is usage register scavenger in such case is proper or maybe there is also any simpler approach? <br></div><div></div><div><br></div><div>Thanks,</div><div>Przemek<br></div><div><br></div><div>
<span style="font-family:monospace"><br></span></div><div><br></div><div><br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Dec 10, 2019 at 6:01 PM 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"><div>Thank you Krzysztof,</div><div>I used pseudo-instruction earlier, but thought there might be easier solution by implementing support for that simply in TableGen files by marking somehow the instructions:)</div><div><br></div><div>Thanks for confirmation, that I have to do this in a such way,</div><div>Przemek<br></div><div><br></div><div> <br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Dec 10, 2019 at 5:51 PM Krzysztof Parzyszek <<a href="mailto:kparzysz@quicinc.com" target="_blank">kparzysz@quicinc.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">Create a pseudo-instruction that represents these two, and expand it into the actual instructions late, after optimizations.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><span style="font-size:9pt;font-family:Consolas">-- </span>
<span style="font-size:9pt;font-family:Consolas"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:8pt;font-family:Consolas">Krzysztof Parzyszek
<a href="mailto:kparzysz@quicinc.com" target="_blank"><span style="color:rgb(5,99,193)">kparzysz@quicinc.com</span></a> AI tools development<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div style="border-color:currentcolor currentcolor currentcolor blue;border-style:none none none solid;border-width:medium medium medium 1.5pt;padding:0in 0in 0in 4pt">
<div>
<div style="border-color:rgb(225,225,225) currentcolor currentcolor;border-style:solid none none;border-width:1pt medium medium;padding:3pt 0in 0in">
<p class="MsoNormal"><b>From:</b> llvm-dev <<a href="mailto:llvm-dev-bounces@lists.llvm.org" target="_blank">llvm-dev-bounces@lists.llvm.org</a>> <b>On Behalf Of
</b>Przemyslaw Ossowski via llvm-dev<br>
<b>Sent:</b> Tuesday, December 10, 2019 10:42 AM<br>
<b>To:</b> llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>><br>
<b>Subject:</b> [EXT] [llvm-dev] Glue two instructions together<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">Hi,<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">for DAG-to-DAG instruction selection I’ve implemented a pattern, which creates from one SDNode two instructions, something like:<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">def: Pat<(NEW_SDNODE REG:$r1),</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> (INST_OUT (INST_IN), REG:$r1)>;</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> </span><u></u><u></u></p>
<p class="MsoNormal">where INST_IN doesn't accepts any inputs and INST_OUT accepts two inputs - one returned by INST_IN and REG;$r1.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Is there any possibility to ‘Glue’ two instruction created in a such way? Maybe something similar to creation SDNodes with SDNPOutGlue, SDNPInGlue) ?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">These two instructions INST_IN and INST_OUT have to be one after another without any other inserted between them.<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Thanks,<u></u><u></u></p>
<p class="MsoNormal">Przemek<u></u><u></u></p>
</div>
</div>
</div>
</div>
</blockquote></div>
</blockquote></div>