<div dir="ltr"><div dir="ltr"></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jun 23, 2021 at 12:23 PM Krzysztof Parzyszek via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</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">Check if MachineInstr::[sg]etPreInstrSymbol do what you need.<br></blockquote><div><br></div><div>I have generated enough awareness of this API that other people mention it now. Success. :)</div><div><br></div><div>A word of caution: depending on where you are in codegen, there are late passes that can delete or duplicate MachineInstrs (tail duplication comes to mind). You need to be reasonably confident that the annotated instruction won't be affected by such passes, or you will get errors from the assembler about an undefined label or duplicate label definitions.</div></div></div>