[mlir][DialectConversion] Add overload of addDynamicallyLegalDialect to support lambdas
authorRiver Riddle <riddleriver@gmail.com>
Mon, 15 Jun 2020 22:30:21 +0000 (15:30 -0700)
committerRiver Riddle <riddleriver@gmail.com>
Mon, 15 Jun 2020 22:57:44 +0000 (15:57 -0700)
commit552ef9fc094f7c0b0d7bf7a9b4d5da1319a2a67a
tree30f1e4eb93fcc59df97946b26c01c26f043ecaf3
parent0e360744f36c5fa8a74f3f9e1e539ec9d43e27ee
[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
mlir/include/mlir/Transforms/DialectConversion.h
mlir/lib/Dialect/SPIRV/SPIRVLowering.cpp
mlir/test/lib/Transforms/TestBufferPlacement.cpp