<div dir="auto">What arch btw?</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">wt., 1.06.2021, 19:16 użytkownik Przemyslaw Ossowski via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> napisał:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">
<p class="MsoNormal" style="margin:0in;font-size:11pt;font-family:"Calibri",sans-serif">Hello,<span></span></p>
<p class="MsoNormal" style="margin:0in;font-size:11pt;font-family:"Calibri",sans-serif"><span> </span></p>
<p class="MsoNormal" style="margin:0in;font-size:11pt;font-family:"Calibri",sans-serif">I would like to add a pass which modifies IR by insertion
set of IR instructions somewhere in the middle of the basicblock,<span></span></p>
<p class="MsoNormal" style="margin:0in;font-size:11pt;font-family:"Calibri",sans-serif">like example below:<span></span></p>
<p class="MsoNormal" style="margin:0in;font-size:11pt;font-family:"Calibri",sans-serif"><span> </span></p>
<p class="MsoNormal" style="margin:0in;font-size:11pt;font-family:"Calibri",sans-serif"><span> </span>%address = call i32*
@llvm.target_intrinsic.getaddress()<span></span></p>
<p class="MsoNormal" style="margin:0in;font-size:11pt;font-family:"Calibri",sans-serif"><span> </span>%value = load i32,
i32* %address<span></span></p>
<p class="MsoNormal" style="margin:0in;font-size:11pt;font-family:"Calibri",sans-serif"><span> </span>%addvalue = add nsw
i32 %value, 10<span></span></p>
<p class="MsoNormal" style="margin:0in;font-size:11pt;font-family:"Calibri",sans-serif"><span> </span>store i32 %addvalue,
i32* %address<span></span></p>
<p class="MsoNormal" style="margin:0in;font-size:11pt;font-family:"Calibri",sans-serif"><span> </span></p>
<p class="MsoNormal" style="margin:0in;font-size:11pt;font-family:"Calibri",sans-serif">Is there any function available which would allow for parsing
the string (containing set of instructions) and generating instructions automatically
instead of manually calling functions creating instructions from IRBuilder?</p><p class="MsoNormal" style="margin:0in;font-size:11pt;font-family:"Calibri",sans-serif">...at least for simple set of basic instructions<br></p><p class="MsoNormal" style="margin:0in;font-size:11pt;font-family:"Calibri",sans-serif"><br></p><p class="MsoNormal" style="margin:0in;font-size:11pt;font-family:"Calibri",sans-serif">Regards,</p><p class="MsoNormal" style="margin:0in;font-size:11pt;font-family:"Calibri",sans-serif">Przemek<br></p><p class="MsoNormal" style="margin:0in;font-size:11pt;font-family:"Calibri",sans-serif"><span></span></p>
</div>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank" rel="noreferrer">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>