<div dir="ltr"><div><div>Sam, thanks for your answer.<br></div><div>That's a great suggestion.<br></div><div><br></div>And excuse me for maybe dilettante question:<br></div>To hard-code use of the global register means to hard-code it in the 'asm string' argument of the instruction definition in the .td file?<br>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-09-01 0:44 GMT+04:00 Sam Parker <span dir="ltr"><<a href="mailto:S.Parker3@lboro.ac.uk" target="_blank">S.Parker3@lboro.ac.uk</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="font-size:12pt;font-family:Calibri,sans-serif"><div>Hi Dmitri,</div><div><br></div><div>If you have such a simple intrinsic which operates on a single register, just lower the intrinsic to a target specific node which is only implemented by a single instruction. Like you were doing before and by using a chain operand. Hard code the instruction to use and define the global register and only pass the instruction the actual variable argument.</div>
<div><br></div><div>Hope that helps,</div><div>Sam</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Sam Parker</div><div>Research Student</div><div>Electronic Systems Design Group</div><div>School of Electronic, Electrical and Systems Engineering</div>
<div>Loughborough University</div></font></span><div><div class="h5"><br><div>----- Reply message -----<br>From: "Dmitri Kovalenko" <<a href="mailto:dmitri.a.kovalenko@gmail.com" target="_blank">dmitri.a.kovalenko@gmail.com</a>><br>
To: <<a href="mailto:llvmdev@cs.uiuc.edu" target="_blank">llvmdev@cs.uiuc.edu</a>><br>Subject: [LLVMdev] understanding DAG: node creation<br>Date: Sat, Aug 30, 2014 22:18</div></div></div></div><div class="HOEnZb">
<div class="h5"><br><div dir="ltr"><div>
<p>I have an intrinsic and it must be lowered to instruction, which works with fixed register.<br>
So, it takes contents of this register and another argument as input.
After execution, the result of the instruction is placed into that same
fixed register.</p>
<p>What should I do in <code>SelectionDAGBuilder::visitIntrinicCall</code> to describe such behaviour for a SDNode?<br></p><p>Thank you for the ideas and insights.<br clear="all"></p></div>-- <br><div>Sincerely,</div><div>
Dmitri Kovalenko</div>
</div>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div>Sincerely,</div><div>Dmitri Kovalenko</div>
</div>