[all-commits] [llvm/llvm-project] efa2d5: [mlir] error out on unsupported attribute kinds in...

ftynse via All-commits all-commits at lists.llvm.org
Tue Mar 3 08:11:00 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: efa2d533773163fafa182bd66003cf4527d46a0f
      https://github.com/llvm/llvm-project/commit/efa2d533773163fafa182bd66003cf4527d46a0f
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2020-03-03 (Tue, 03 Mar 2020)

  Changed paths:
    M mlir/include/mlir/Target/LLVMIR/ModuleTranslation.h
    M mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
    M mlir/test/Target/llvmir-invalid.mlir

  Log Message:
  -----------
  [mlir] error out on unsupported attribute kinds in LLVM global translation

Some attribute kinds are not supported as "value" attributes of
`llvm.mlir.constant` when translating to LLVM IR. We were correctly reporting
an error, but continuing the translation using an "undef" value instead,
leading to a surprising mix of error messages and output IR. Abort the
translation after the error is reported.

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


  Commit: d7fbfbb171492fd1dfa1a0d131faf84facb6f356
      https://github.com/llvm/llvm-project/commit/d7fbfbb171492fd1dfa1a0d131faf84facb6f356
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2020-03-03 (Tue, 03 Mar 2020)

  Changed paths:
    M mlir/lib/ExecutionEngine/ExecutionEngine.cpp

  Log Message:
  -----------
  [mlir] ExecutionEngine: fix assertion on the error path

MLIR ExecutionEngine and derived tools (e.g., mlir-cpu-runner) would trigger an
assertion inside ORC JIT while ExecutionEngine is being destructed after a
failed linking due to a missing function definition. The reason for this is the
JIT lookup that may return an Error referring to strings stored internally by
the JIT. If the Error outlives the ExecutionEngine, it would want have a
dangling reference, which is currently caught by an assertion inside JIT thanks
to hand-rolled reference counting. Rewrap the error message into a string
before returning.

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


Compare: https://github.com/llvm/llvm-project/compare/680a75e1e45b...d7fbfbb17149


More information about the All-commits mailing list