This patch lowers the memory space of an unraked memref to the
proper address space in LLVM. We were always lowering it to the
default memory space.
Details
- Reviewers
ftynse rriddle mehdi_amini nicolasvasilache
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Hmm, this may not be as straightforward as it seems. The pointer in the unranked memref descriptor is to the ranked descriptor struct rather than to the data. Since we don't have two memory spaces in the type, we need to at least define a convention. One can be that the descriptor of the memref is allocated in the same memory space as the memref itself, which requires changes to memref_cast lowering and thinking about what it means for descriptors that live in registers. Another convention can be that the descriptor itself lives in the default memory space, and then this change isn't necessary, only making sure that memref_cast produces the llvm.bitcast to a descriptor struct with correct memory spaces inside.
Sorry, I misunderstood what an unranked memref models. This indeed doesn't make sense as is. Thanks.