[llvm-dev] Address of instruction in codegen
Reid Kleckner via llvm-dev
llvm-dev at lists.llvm.org
Thu Jun 24 11:37:58 PDT 2021
On Wed, Jun 23, 2021 at 12:23 PM Krzysztof Parzyszek via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> Check if MachineInstr::[sg]etPreInstrSymbol do what you need.
I have generated enough awareness of this API that other people mention it
now. Success. :)
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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev