[all-commits] [llvm/llvm-project] ff459c: [mlir] Fix invalidated reference when loading depe...

Jeff Niu via All-commits all-commits at lists.llvm.org
Thu Dec 16 10:59:25 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ff459c1f67f13925d02fc2570bdc99bf56f7993c
      https://github.com/llvm/llvm-project/commit/ff459c1f67f13925d02fc2570bdc99bf56f7993c
  Author: Mogball <jeffniu22 at gmail.com>
  Date:   2021-12-16 (Thu, 16 Dec 2021)

  Changed paths:
    M mlir/lib/IR/MLIRContext.cpp

  Log Message:
  -----------
  [mlir] Fix invalidated reference when loading dependent dialects

When a dialect is loaded with `getOrLoadDialect`, its constructor may recurse and call `getOrLoadDialect` on a dependent dialect, which may result in an insertion in the dialect map, invalidating the reference to the (previously null) dialect pointer.

Reviewed By: mehdi_amini

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




More information about the All-commits mailing list