This is an archive of the discontinued LLVM Phabricator instance.

[mlir] support translation of multidimensional vectors to LLVM IR
ClosedPublic

Authored by ftynse on Jan 16 2020, 7:22 AM.

Details

Summary

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.

Diff Detail

Event Timeline

ftynse created this revision.Jan 16 2020, 7:22 AM
nicolasvasilache accepted this revision.Jan 16 2020, 7:24 AM

Great, thanks for pushing this forward Alex!

This revision is now accepted and ready to land.Jan 16 2020, 7:24 AM

Unit tests: pass. 61913 tests passed, 0 failed and 783 were skipped.

clang-tidy: unknown.

clang-format: pass.

Build artifacts: diff.json, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml

This revision was automatically updated to reflect the committed changes.
rriddle added inline comments.Jan 16 2020, 3:16 PM
mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
35

This functions needs some documentation.