<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div data-marker="__QUOTED_TEXT__"><div style="font-family:'arial' , 'helvetica' , sans-serif;font-size:12pt;color:#000000"><div>Hi,<br></div><div>Is there a straight-forward way to obtain an arbitrary MachineInstruction address and maintain it updated along the backend optimizations, even if it is in the middle of a MachineBasicBlock?<br></div><div>I have an instruction that takes a relative address. E.g<br></div><br><div>BB0:<br></div><div>     myInstruction BBN + 4*x<br></div><br><div>BBN:<br></div><div>     ... x instructions ...<br></div><div>     target_instruction       <<=== it points to here.<br></div><br><div>The issues I have are:</div><div>1) I only see the ability to obtain basic-block addresses/labels, and these are only updated in terminator instructions. So by change that basic block is renamed/merged the value in myInstruction gets corrupt.<br></div><div>2) Even if I set-up the instruction at the top of a basic block, eventually the BB gets merged, so just pointing to the BB label is not enough.<br></div><div><br data-mce-bogus="1"></div><div>I do see MCSymbol, but I don't get it. It seems to be resolved during asm printing.<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>Thanks,<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div></div><div style="font-family:'arial' , 'helvetica' , sans-serif;font-size:12pt;color:#000000"><div><br><div style="font-size:9pt;font-family:'arial' , 'helvetica' , sans-serif"> <span style="color:#4d4d4d;font-size:9pt"><strong>Diogo Sampaio</strong></span><br> <span style="color:#11588f;font-size:9pt"><strong>Senior Compiler Engineer • Kalray</strong></span><br> <span style="color:#11588f;font-size:8pt"><u>dsampaio@kalrayinc.com</u> • <a href="https://www.kalrayinc.com" style="color:#11588f" rel="nofollow noopener noreferrer nofollow noopener noreferrer nofollow noopener noreferrer" target="_blank"><u>www.kalrayinc.com</u></a></span> </div><div> <br></div><table cellpadding="0px" border="0px"><tbody><tr><td> <div> <a href="https://www.kalrayinc.com" rel="nofollow noopener noreferrer nofollow noopener noreferrer nofollow noopener noreferrer" target="_blank"> <img alt="Kalray logo" src="https://www.kalrayinc.com/IMG/png/signature_logo_kalray.png"></a> </div> </td><td> <div style="padding-left:10px;border-left:1px solid #58585a"> <span style="color:#58585a;font-size:8pt;font-family:'arial' , 'helvetica' , sans-serif;display:block;line-height:120%">The Processor at the Heart<br>of Intelligent Systems</span></div> </td></tr></tbody></table><div> <br>   <span style="color:#7db621;font-size:8pt;font-family:'arial' , 'helvetica' , sans-serif"><strong> Please consider the environment before printing this e-mail.</strong></span></div></div></div><br></div></div></body></html>