[all-commits] [llvm/llvm-project] 0409eb: [mlir] Keep track of region signature conversions ...

ftynse via All-commits all-commits at lists.llvm.org
Tue Feb 2 01:38:55 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0409eb287414b71cfdcda13796c93794b71ea6d4
      https://github.com/llvm/llvm-project/commit/0409eb287414b71cfdcda13796c93794b71ea6d4
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2021-02-02 (Tue, 02 Feb 2021)

  Changed paths:
    M mlir/lib/Transforms/Utils/DialectConversion.cpp
    M mlir/test/Transforms/test-legalize-type-conversion.mlir
    M mlir/test/lib/Dialect/Test/TestOps.td
    M mlir/test/lib/Dialect/Test/TestPatterns.cpp

  Log Message:
  -----------
  [mlir] Keep track of region signature conversions as argument replacements

In dialect conversion, signature conversions essentially perform block argument
replacement and are added to the general value remapping. However, the replaced
values were not tracked, so if a signature conversion was rolled back, the
construction of operand lists for the following patterns could have obtained
block arguments from the mapping and give them to the pattern leading to
use-after-free. Keep track of signature conversions similarly to normal block
argument replacement, and erase such replacements from the general mapping when
the conversion is rolled back.

Reviewed By: rriddle

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




More information about the All-commits mailing list