[all-commits] [llvm/llvm-project] bc270f: [mlir][llvm] Iterative constant import from LLVM IR.

Tobias Gysi via All-commits all-commits at lists.llvm.org
Fri Nov 18 06:17:26 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bc270f9ed1c86db3f3a537dc6f91cda94737b915
      https://github.com/llvm/llvm-project/commit/bc270f9ed1c86db3f3a537dc6f91cda94737b915
  Author: Tobias Gysi <tobias.gysi at nextsilicon.com>
  Date:   2022-11-18 (Fri, 18 Nov 2022)

  Changed paths:
    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/test/Target/LLVMIR/Import/constant.ll
    M mlir/test/Target/LLVMIR/Import/incorrect-constant-caching.ll
    M mlir/test/Target/LLVMIR/Import/incorrect-constexpr-inst-caching.ll
    M mlir/test/Target/LLVMIR/Import/intrinsic.ll
    M mlir/test/Target/LLVMIR/Import/zeroinitializer.ll
    M mlir/tools/mlir-tblgen/LLVMIRConversionGen.cpp

  Log Message:
  -----------
  [mlir][llvm] Iterative constant import from LLVM IR.

Instead of importing constant expressions recursively, the revision
walks all dependencies of an LLVM constant iteratively. The actual
conversion then iterates over a list of constants and all intermediate
constant values are added to the value mapping. As a result, an LLVM IR
constant maps to exactly one MLIR operation per function. The revision
adapts the existing tests since the constant ordering changed for
aggregate types. Additionally, it adds extra tests that mix aggregate
constants and constant expressions.

Depends on D137416

Reviewed By: ftynse

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




More information about the All-commits mailing list