[flang-commits] [mlir] [flang] [mlir] Expose type and attribute names in the MLIRContext and abstract type/attr classes (PR #72189)

Mehdi Amini via flang-commits flang-commits at lists.llvm.org
Wed Nov 29 19:47:28 PST 2023


joker-eph wrote:

> So my understanding is that `DenseMap<StringAttr, AbstractType*>` was what was creating the problem, but I'm not sure if this is a mistake on my end or if this is not possible.
> 
> For it to work, we would need to create a `StringAttr` before loading the `builtin` dialect, is that possible? This is because when we are loading the `builtin` dialect, we need to create those `StringAttr` for the type names when we load each type/attribute.

Oh great... We can't add the name for `StringAttr` before registering the storage is that it?

Pretty sad about these string duplication, but we can live with it. Please document this next to the StringMap.

> So for now I removed it, please tell me if you see a way I could make this work!

It's likely possible, but will require some deeper look. I may try this after you land it!

https://github.com/llvm/llvm-project/pull/72189


More information about the flang-commits mailing list