[PATCH] D79017: [mlir][llvm] Fix llvmBuilder for llvm.alloca so it could emit to non-zero addrspace.

Alex Zinenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 30 03:58:17 PDT 2020


ftynse added a comment.

In D79017#2010774 <https://reviews.llvm.org/D79017#2010774>, @whchung wrote:

> @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 <https://reviews.llvm.org/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 <https://reviews.llvm.org/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.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79017/new/

https://reviews.llvm.org/D79017





More information about the llvm-commits mailing list