[llvm-dev] Address of instruction in codegen

David Greene via llvm-dev llvm-dev at lists.llvm.org
Wed Jul 7 19:40:18 PDT 2021


Reid Kleckner <rnk at google.com> writes:

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

I actually ran into that.  :)  Would a patch to fix the tail merging
issue be of interest?  As composed now I have it not allowing merging
where a pre- or post-symbol differs but I can also imagine enhancements
to update uses of the symbol.

                        -David


More information about the llvm-dev mailing list