[mlir][LLVMIR] Add support for importing struct-type ConstantAggregate(Zero)
authorMin-Yih Hsu <minyihh@uci.edu>
Wed, 20 Apr 2022 17:48:42 +0000 (10:48 -0700)
committerMin-Yih Hsu <minyihh@uci.edu>
Wed, 27 Apr 2022 16:42:26 +0000 (09:42 -0700)
commit00fcf9e95a4ab4ee5846b55bd09bb8a4257dfb67
tree485f9f7ed7161a4e8096dcbaf176bf1b21b1daf0
parentd8b4ea486a5c152ba1ceb656a3d6638defe40fe1
[mlir][LLVMIR] Add support for importing struct-type ConstantAggregate(Zero)

And move importer test files from `test/Target/LLVMIR` into
`test/Target/LLVMIR/Import`.

We simply translate struct-type ConstantAggregate(Zero) into a
serious of `llvm.insertvalue` operations against a `llvm.undef` root.
Note that this doesn't affect the original logics on translating
vector/array-type ConstantAggregate values.

Differential Revision: https://reviews.llvm.org/D124399
mlir/lib/Target/LLVMIR/ConvertFromLLVMIR.cpp
mlir/test/Target/LLVMIR/Import/basic.ll [new file with mode: 0644]
mlir/test/Target/LLVMIR/Import/constant-aggregate.ll [new file with mode: 0644]
mlir/test/Target/LLVMIR/Import/data-layout.ll [new file with mode: 0644]
mlir/test/Target/LLVMIR/Import/opaque.ll [new file with mode: 0644]
mlir/test/Target/LLVMIR/Import/zeroinitializer.ll [new file with mode: 0644]
mlir/test/Target/LLVMIR/data-layout.ll [deleted file]
mlir/test/Target/LLVMIR/import-opaque.ll [deleted file]
mlir/test/Target/LLVMIR/import.ll [deleted file]