Hi I just came from here trying to find a way to build a normal symbol table with mlir.
However, I cannot understand the doc, nor does it provide any example on how to create one.
What I would like to do is to:
- Insert target operations (function or variables) into a symbol table
- Can search by name and find the target operation
- Can read relevant information (attribute, operands, type) of the target operation
I tried to use a
std::map to do this, but it seems that the address of operation will change while inserting or removing other operations within the same region.
Thus I would like to ask how and what I should do? How I can keep track of target symbol and find target operation??