Issue 130321
Summary [mlir][DLTI] Revisit design of data layout memory space entries
Labels mlir
Assignees
Reporter fabianmcg
    Origin: This issue arises from the conversation in: https://github.com/llvm/llvm-project/pull/127416

Description:
Currently, the data layout spec interface expose methods to get the keys for retrieving the alloca, global and program memory spaces in the data layout. However, such method has some quirks. Consider the following example:

```
DL1 /*interface methods*/ [alloca_identifier = "dlti.alloca_memory_space"] /*data layout entries*/ <ptr spec> {
  DL2 /*interface methods*/ [alloca_identifier = "my_dlti.alloca_memory_space"] /*data layout entries*/ <ptr spec> {
    DL3 /*interface methods*/ [alloca_identifier = "dlti.alloca_memory_space"] {
      # get the alloca memory space.
 }
  }
}
```
Under the status quo, it's not fully clear what should be the correct answer if the layouts are combined. Is it an entry in DL1 or DL2?

Posible solution:
Remove the methods and fully define unique static keys for them.

CC:
@rolfmorel, @ftynse, @Dinistro 
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to