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.
Differential D79017
[mlir][llvm] Fix llvmBuilder for llvm.alloca so it could emit to non-zero addrspace. whchung on Apr 28 2020, 9:16 AM. Authored by
Details
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.
Diff Detail
Event TimelineComment Actions
I would actually advise to keep the patches separate, it's easier to review and track changes in the history. Comment Actions @ftynse I reclaimed the patch. But I'm not sure how to add an extra test specifically for this patch without mlir-translate changes introduced in D79019. 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. Comment Actions 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. |