Add support for inlining calls with different arg/result types from the callable.
authorRiver Riddle <riverriddle@google.com>
Fri, 4 Oct 2019 06:10:25 +0000 (23:10 -0700)
committerA. Unique TensorFlower <gardener@tensorflow.org>
Fri, 4 Oct 2019 06:10:51 +0000 (23:10 -0700)
commit5830f71a45df33e24c864bea4c5de070be47b488
treea10efe1ce637e9995cf3a4033d1b17533e6d0069
parenta20d96e436272b52d36f52c4a07c86ed285502e9
Add support for inlining calls with different arg/result types from the callable.

Some dialects have implicit conversions inherent in their modeling, meaning that a call may have a different type that the type that the callable expects. To support this, a hook is added to the dialect interface that allows for materializing conversion operations during inlining when there is a mismatch. A hook is also added to the callable interface to allow for introspecting the expected result types.

PiperOrigin-RevId: 272814379
mlir/include/mlir/Analysis/CallInterfaces.td
mlir/include/mlir/IR/Function.h
mlir/include/mlir/Transforms/InliningUtils.h
mlir/lib/Transforms/Inliner.cpp
mlir/lib/Transforms/Utils/InliningUtils.cpp
mlir/test/Transforms/inlining.mlir
mlir/test/lib/TestDialect/TestDialect.cpp
mlir/test/lib/TestDialect/TestOps.td