[all-commits] [llvm/llvm-project] c65f8d: [mlir][linalg] Fix crashes in parser on linalg ops...

Felix Schneider via All-commits all-commits at lists.llvm.org
Sun Jul 7 09:09:46 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c65f8d881671c3c7966fbbc967b7c4ca063d989b
      https://github.com/llvm/llvm-project/commit/c65f8d881671c3c7966fbbc967b7c4ca063d989b
  Author: Felix Schneider <fx.schn at gmail.com>
  Date:   2024-07-07 (Sun, 07 Jul 2024)

  Changed paths:
    M mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
    M mlir/test/Dialect/Linalg/invalid.mlir

  Log Message:
  -----------
  [mlir][linalg] Fix crashes in parser on linalg ops without operands (#97944)

`parseDstStyleOp` parses both `ins()` and `outs()` optionally. The
parsers for `linalg.transpose`, `linalg.broadcast` and `linalg.map`
however assume that at least one operand is present in the state,
leading to crashes otherwise.

This patch adds checks to the parsers which stop them from crashing if
no operands were parsed. When the Ops are parsed successfuly, the
verifiers can work on them.

Fix https://github.com/llvm/llvm-project/issues/97857



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list