<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>