Hello!
I’m currently translating a project from LLVM IR to MLIR and I’ve run into an issue I can’t find the solution to.
At specific points in our functions we need to have labels as such:
.globl func_1 # -- Begin function func_1
.p2align 2
.type func_1,@function
func_1: # @func_1
.cfi_startproc
.Ltmp13: # Block address taken
# %bb.0: # %func_1
...
instructions
...
.Ltmp14: # Block address taken
# %bb.1: # %func_1_lookup1
...
instructions
...
.Lfunc_end14:
.size func_1, .Lfunc_end14-func_1
.cfi_endproc
To be more specific, we need the labels Ltmp13 and Ltmp14 to be generated, and these labels are later referenced in a global lookup table:
.word 6 # 0x6
.zero 4
.quad 0
.word 0 # 0x0
.word 0 # 0x0
.quad .Ltmp13
.word 0 # 0x0
.zero 4
However, the techniques used in the LLVM IR project, such as directly referencing a LLVM BasicBlock no longer work here.
How would I do this in MLIR?