[all-commits] [llvm/llvm-project] 9c61c7: [mlir][cse] do not replace operands in previously ...

Andrew Young via All-commits all-commits at lists.llvm.org
Wed Mar 31 12:20:54 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9c61c76b127d53a5d14033cdb6abb4b3daaa0f67
      https://github.com/llvm/llvm-project/commit/9c61c76b127d53a5d14033cdb6abb4b3daaa0f67
  Author: Andrew Young <youngar17 at gmail.com>
  Date:   2021-03-31 (Wed, 31 Mar 2021)

  Changed paths:
    M mlir/lib/Transforms/CSE.cpp
    M mlir/test/Transforms/cse.mlir

  Log Message:
  -----------
  [mlir][cse] do not replace operands in previously simplified operations

If an operation has been inserted as a key in to the known values
hashtable, then it can not be modified in a way which changes its hash.
This change avoids modifying the operands of any previously recorded
operation, which prevents their hash from changing.

In an SSACFG region, it is impossible to visit an operation before
visiting its operands, so this is not a problem. This situation can only
happen in regions without strict dominance, such as graph regions.

Reviewed By: rriddle

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




More information about the All-commits mailing list