[all-commits] [llvm/llvm-project] 0e3607: [mlir][DialectConversion] Cache type conversions a...

River Riddle via All-commits all-commits at lists.llvm.org
Mon Jun 15 15:58:13 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 0e360744f36c5fa8a74f3f9e1e539ec9d43e27ee
      https://github.com/llvm/llvm-project/commit/0e360744f36c5fa8a74f3f9e1e539ec9d43e27ee
  Author: River Riddle <riddleriver at gmail.com>
  Date:   2020-06-15 (Mon, 15 Jun 2020)

  Changed paths:
    M mlir/include/mlir/Transforms/DialectConversion.h
    M mlir/lib/Dialect/Linalg/Transforms/TensorsToBuffers.cpp
    M mlir/lib/Transforms/DialectConversion.cpp
    M mlir/test/lib/Dialect/Test/TestPatterns.cpp
    M mlir/test/lib/Transforms/TestBufferPlacement.cpp

  Log Message:
  -----------
  [mlir][DialectConversion] Cache type conversions and add a few useful helpers

It is quite common for the same type to be converted many types throughout the conversion process, and there isn't any good reason why we aren't caching that result. Especially given that we currently use identity conversion to signify legality. This revision also adds a few additional helpers to TypeConverter.

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


  Commit: 552ef9fc094f7c0b0d7bf7a9b4d5da1319a2a67a
      https://github.com/llvm/llvm-project/commit/552ef9fc094f7c0b0d7bf7a9b4d5da1319a2a67a
  Author: River Riddle <riddleriver at gmail.com>
  Date:   2020-06-15 (Mon, 15 Jun 2020)

  Changed paths:
    M mlir/include/mlir/Transforms/DialectConversion.h
    M mlir/lib/Dialect/SPIRV/SPIRVLowering.cpp
    M mlir/test/lib/Transforms/TestBufferPlacement.cpp

  Log Message:
  -----------
  [mlir][DialectConversion] Add overload of addDynamicallyLegalDialect to support lambdas

This allows for passing a lambda to addDynamicallyLegalDialect without needing to explicit wrap with Optional<DynamicLegalityCallbackFn>.

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


Compare: https://github.com/llvm/llvm-project/compare/bd970ef7c6b2...552ef9fc094f


More information about the All-commits mailing list