[all-commits] [llvm/llvm-project] ddd556: [mlir][pdl] Fix bug when ordering predicates

River Riddle via All-commits all-commits at lists.llvm.org
Mon Feb 22 19:07:59 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ddd556f10e382e64003c98fa9308ce1860cc2ad6
      https://github.com/llvm/llvm-project/commit/ddd556f10e382e64003c98fa9308ce1860cc2ad6
  Author: River Riddle <riddleriver at gmail.com>
  Date:   2021-02-22 (Mon, 22 Feb 2021)

  Changed paths:
    M mlir/lib/Conversion/PDLToPDLInterp/PredicateTree.cpp
    M mlir/test/Conversion/PDLToPDLInterp/pdl-to-pdl-interp-matcher.mlir

  Log Message:
  -----------
  [mlir][pdl] Fix bug when ordering predicates

We should be ordering predicates with higher primary/secondary sums first, but we are currently ordering them last. This allows for predicates more frequently encountered to be checked first.

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


  Commit: 154cabe722de4d9837d49790e913d2b511f17d70
      https://github.com/llvm/llvm-project/commit/154cabe722de4d9837d49790e913d2b511f17d70
  Author: River Riddle <riddleriver at gmail.com>
  Date:   2021-02-22 (Mon, 22 Feb 2021)

  Changed paths:
    M mlir/lib/Rewrite/ByteCode.cpp

  Log Message:
  -----------
  [mlir][pdl][NFC] Extract the execution of each bytecode operation into its own function

This makes the implementation of each bytecode operation much easier to reason about, and lets the compiler decide which implementations are beneficial to inline into the main switch.

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


Compare: https://github.com/llvm/llvm-project/compare/4125cabce137...154cabe722de


More information about the All-commits mailing list