[all-commits] [llvm/llvm-project] b6a2e3: [mlir][llvm] Fix bug in constant import from LLVM IR.

Tobias Gysi via All-commits all-commits at lists.llvm.org
Mon Feb 6 01:12:22 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b6a2e33500cd29c8cce40acd08ff1dbd7559656f
      https://github.com/llvm/llvm-project/commit/b6a2e33500cd29c8cce40acd08ff1dbd7559656f
  Author: Tobias Gysi <tobias.gysi at nextsilicon.com>
  Date:   2023-02-06 (Mon, 06 Feb 2023)

  Changed paths:
    M mlir/lib/Target/LLVMIR/ModuleImport.cpp
    M mlir/test/Target/LLVMIR/Import/constant.ll
    M mlir/test/Target/LLVMIR/Import/global-variables.ll
    M mlir/test/Target/LLVMIR/Import/incorrect-constant-caching.ll
    M mlir/test/Target/LLVMIR/Import/incorrect-constexpr-inst-caching.ll

  Log Message:
  -----------
  [mlir][llvm] Fix bug in constant import from LLVM IR.

The revision addresses a bug during constant expression traversal
when importing LLVM IR. A constant expression may have cyclic
dependencies, for example, when a constant is initialized with its
address. This revision extends the constant expression traversal
to detect cyclic dependencies and adds a test to verify this
case is handled properly.

Reviewed By: Dinistro

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




More information about the All-commits mailing list