For certain targets alloca can take place on a non-zero addrspace.
No tests are added for this patch as existing patches would all pass.
Subsequent patches to mlir-translate would cover cases where alloca on non-zero addrspace takes place.
whchung on Apr 28 2020, 9:16 AM.Authored by
In mlir/test/Target/llvmir.mlir there are tests which checks this particular function how llvm.alloca gets translated to llvm alloca instruction. They are working fine.
And without D79019, there is really no way for mlir-translate to emit alloca on a different addrspace.
Good point. That's why I was thinking that the data layout should be available in the std->llvm conversion and llvm.alloca should produce pointers in the right address space to start with, so there is no need to patch it back in the translation.