[all-commits] [llvm/llvm-project] 5a6ff2: Adjust assertion when casting to an unregistered o...

Mehdi Amini via All-commits all-commits at lists.llvm.org
Tue Aug 25 23:57:49 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 5a6ff2bb3e6ce42817d6618d977428c394d1709d
      https://github.com/llvm/llvm-project/commit/5a6ff2bb3e6ce42817d6618d977428c394d1709d
  Author: Mehdi Amini <joker.eph at gmail.com>
  Date:   2020-08-26 (Wed, 26 Aug 2020)

  Changed paths:
    M mlir/include/mlir/IR/OpDefinition.h

  Log Message:
  -----------
  Adjust assertion when casting to an unregistered operation

This assertion does not achieve what it meant to do originally, as it
would fire only when applied to an unregistered operation, which is a
fairly rare circumstance (it needs a dialect or context allowing
unregistered operation in the input in the first place).
Instead we relax it to only fire when it should have matched but didn't
because of the misconfiguration.

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


  Commit: 0b7c184c2d8f8ecf7daf89e9e58a80c6426c2835
      https://github.com/llvm/llvm-project/commit/0b7c184c2d8f8ecf7daf89e9e58a80c6426c2835
  Author: Mehdi Amini <joker.eph at gmail.com>
  Date:   2020-08-26 (Wed, 26 Aug 2020)

  Changed paths:
    M mlir/include/mlir/IR/PatternMatch.h

  Log Message:
  -----------
  Add assertion in PatternRewriter::create<> to defend the same way as OpBuilder::create<> against missing dialect registration (NFC)

The code would have failed a few line later, but that way the error
message is more clear/friendly to debug.


Compare: https://github.com/llvm/llvm-project/compare/fe44992b797f...0b7c184c2d8f


More information about the All-commits mailing list