[all-commits] [llvm/llvm-project] b2ab37: [mlir] use the new stateful LLVM type translator b...

ftynse via All-commits all-commits at lists.llvm.org
Wed Aug 5 15:36:50 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: b2ab375d1f08ab0faecc20f0340cb972f31010a7
      https://github.com/llvm/llvm-project/commit/b2ab375d1f08ab0faecc20f0340cb972f31010a7
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2020-08-06 (Thu, 06 Aug 2020)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/LLVMDialect.h
    M mlir/include/mlir/Target/LLVMIR/ModuleTranslation.h
    M mlir/include/mlir/Target/LLVMIR/TypeTranslation.h
    M mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp
    M mlir/lib/Target/LLVMIR/ConvertFromLLVMIR.cpp
    M mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
    M mlir/lib/Target/LLVMIR/TypeTranslation.cpp
    M mlir/test/Target/import.ll
    M mlir/test/Target/llvmir-types.mlir
    M mlir/test/lib/CMakeLists.txt
    R mlir/test/lib/Target/CMakeLists.txt
    R mlir/test/lib/Target/TestLLVMTypeTranslation.cpp
    M mlir/tools/mlir-translate/mlir-translate.cpp

  Log Message:
  -----------
  [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




More information about the All-commits mailing list