[all-commits] [llvm/llvm-project] eb67bd: [mlir] LLVM dialect: Generate conversions between ...

ftynse via All-commits all-commits at lists.llvm.org
Thu Jan 30 12:55:13 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: eb67bd78dc1865fce0c35f241f62cf65f4452e3e
      https://github.com/llvm/llvm-project/commit/eb67bd78dc1865fce0c35f241f62cf65f4452e3e
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2020-01-30 (Thu, 30 Jan 2020)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/CMakeLists.txt
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOpBase.td
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
    M mlir/lib/Target/LLVMIR/ConvertFromLLVMIR.cpp
    M mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
    M mlir/tools/mlir-tblgen/LLVMIRConversionGen.cpp

  Log Message:
  -----------
  [mlir] LLVM dialect: Generate conversions between EnumAttrCase and LLVM API

Summary:
MLIR materializes various enumeration-based LLVM IR operands as enumeration
attributes using ODS. This requires bidirectional conversion between different
but very similar enums, currently hardcoded. Extend the ODS modeling of
LLVM-specific enumeration attributes to include the name of the corresponding
enum in the LLVM C++ API as well as the names of specific enumerants. Use this
new information to automatically generate the conversion functions between enum
attributes and LLVM API enums in the two-way conversion between the LLVM
dialect and LLVM IR proper.

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




More information about the All-commits mailing list