Refactor the TypeConverter to support more robust type conversions:
authorRiver Riddle <riverriddle@google.com>
Wed, 19 Jun 2019 20:58:31 +0000 (13:58 -0700)
committerMehdi Amini <joker.eph@gmail.com>
Thu, 20 Jun 2019 06:08:33 +0000 (23:08 -0700)
commit9764ae3f2424ab9849d57c9f529ac371194eb62c
tree08bb802edaf92f83c17d184ac1c01da9eccbdc77
parent927b7074a805808260b1216b9b9ecb52aab92c23
Refactor the TypeConverter to support more robust type conversions:
* Support for 1->0 type mappings, i.e. when the argument is being removed.
* Reordering types when converting a type signature.
* Adding new inputs when converting a type signature.

This cl also lays down the initial foundation for supporting 1->N type mappings, but full support will come in a followup.

Moving forward, function signature changes will be driven by populating a SignatureConversion instance. This class contains all of the necessary information for adding/removing/remapping function signatures; e.g. addInputs, addResults, remapInputs, etc.

PiperOrigin-RevId: 254064665
mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h
mlir/include/mlir/IR/Block.h
mlir/include/mlir/Transforms/DialectConversion.h
mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
mlir/lib/IR/Block.cpp
mlir/lib/Transforms/DialectConversion.cpp
mlir/test/TestDialect/TestDialect.cpp
mlir/test/TestDialect/TestPatterns.cpp
mlir/test/Transforms/test-legalizer.mlir