Skip to content

[mlir][DLTI] Revisit design of data layout memory space entries #130321

@fabianmcg

Description

@fabianmcg

Origin: This issue arises from the conversation in: #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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions