HomePhabricator

[mlir] use the new stateful LLVM type translator by default

Authored by ftynse on Aug 5 2020, 5:44 AM.

Description

[mlir] use the new stateful LLVM type translator by default

Previous type model in the LLVM dialect did not support identified structure
types properly and therefore could use stateless translations implemented as
free functions. The new model supports identified structs and must keep track
of the identified structure types present in the target context (LLVMContext or
MLIRContext) to avoid creating duplicate structs due to LLVM's type
auto-renaming. Expose the stateful type translation classes and use them during
translation, storing the state as part of ModuleTranslation.

Drop the test type translation mechanism that is no longer necessary and update
the tests to exercise type translation as part of the main translation flow.

Update the code in vector-to-LLVM dialect conversion that relied on stateless
translation to use the new class in a stateless manner.

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D85297

Details

Committed
ftynseAug 5 2020, 3:36 PM
Reviewer
rriddle
Differential Revision
D85297: [mlir] use the new stateful LLVM type translator by default
Parents
rGe1de85f9f4da: Add verification for DW_AT_decl_file and DW_AT_call_file.
Branches
Unknown
Tags
Unknown