Update memref type doc to add that memrefs in different memory spaces
cannot alias with each other. This allows aliasing checks to be more
powerful and enforces a useful restriction/canonicalization.
While on this, fix a stale statement.
Differential D121270
Update memref type doc on aliasing guarantee across memory spaces bondhugula on Mar 8 2022, 8:07 PM. Authored by
Details
Update memref type doc to add that memrefs in different memory spaces While on this, fix a stale statement.
Diff Detail
Event TimelineComment Actions Is this actually safe though? In LLVM, address spaces are allowed to alias. For example, you could have a hierarchy of memory regions, where some address spaces are a superset of the others (and thus can alias), and could even have the old x86-16 segment-offset style thing where you have pervasive aliases possible. I believe that LLVM pointer address spaces support this sort of thing. Comment Actions Do you foresee needing such low-level abstractions and unrestricted generality on the memref type? The memref type is not used with the LLVM dialect - so you can still have such address space aliasing in the LLVM dialect or other similar dialects that are closer to the target. Comment Actions Address spaces can also be used for the exact same memory but a different representation of the pointers, which can come with semantic differences; we use them in CHERI LLVM to differentiate between traditional integer addresses and CHERI capabilities, with the latter having associated bounds and permissions to provide spatial safety. |