[all-commits] [llvm/llvm-project] 88f0e4: [mlir][async] Avoid crash when not using `func.fun...

Rik Huijzer via All-commits all-commits at lists.llvm.org
Mon Nov 20 23:40:29 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 88f0e4c75c1ac498f2223fc640c4ff6c572c5ed1
      https://github.com/llvm/llvm-project/commit/88f0e4c75c1ac498f2223fc640c4ff6c572c5ed1
  Author: Rik Huijzer <github at huijzer.xyz>
  Date:   2023-11-21 (Tue, 21 Nov 2023)

  Changed paths:
    M mlir/include/mlir/Dialect/Async/Passes.td
    M mlir/test/Dialect/Async/async-parallel-for-compute-fn.mlir
    M mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp

  Log Message:
  -----------
  [mlir][async] Avoid crash when not using `func.func` (#72801)

The `createParallelComputeFunction` crashed when calling
`getFunctionTypeAttrName` during the creation of a new `FuncOp` inside
the pass. The problem is that `getFunctionTypeAttrName` looks up the
attribute name for the function type which in this case is `func.func`.
However, `name.getAttributeNames()` was empty when clients used
`llvm.func` instead of `func.func`.

To fix this, the `func` dialect is now registered as a dependent
dialect. Also, I've added an assertion which could save other people
some time.

Fixes #71281, fixes #64326.




More information about the All-commits mailing list