[PATCH] D72846: [mlir] support translation of multidimensional vectors to LLVM IR

Alex Zinenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 16 07:22:45 PST 2020


ftynse created this revision.
Herald added subscribers: llvm-commits, liufengdb, aartbik, lucyrfox, mgester, arpith-jacob, antiagainst, shauheen, burmako, jpienaar, rriddle, mehdi_amini.
Herald added a reviewer: nicolasvasilache.
Herald added a project: LLVM.

MLIR unlike LLVM IR supports multidimensional vector types. Such types are
lowered to nested LLVM IR arrays wrapping an LLVM IR vector for the innermost
dimension of the MLIR vector. MLIR supports constants of such types using
ElementsAttr for values. Introduce support for converting ElementsAttr into
LLVM IR Constant Aggregates recursively. This enables translation of
multidimensional vector constants from MLIR to LLVM IR.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D72846

Files:
  mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
  mlir/test/Target/llvmir-invalid.mlir
  mlir/test/Target/llvmir.mlir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72846.238494.patch
Type: text/x-patch
Size: 6820 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200116/51a2b488/attachment.bin>


More information about the llvm-commits mailing list