NFC: Refactor block signature conversion to not erase the original arguments.
authorRiver Riddle <riverriddle@google.com>
Wed, 13 Nov 2019 18:27:21 +0000 (10:27 -0800)
committerA. Unique TensorFlower <gardener@tensorflow.org>
Wed, 13 Nov 2019 18:27:53 +0000 (10:27 -0800)
commitd985c7488393a181f30b0faeb3083ec0c27983eb
tree6d772ec663a965645858879b92f15dfc0260c96f
parentf45852be6c152efc377419e3c8bead5d80544223
NFC: Refactor block signature conversion to not erase the original arguments.

This refactors the implementation of block signature(type) conversion to not insert fake cast operations to perform the type conversion, but to instead create a new block containing the proper signature. This has the benefit of enabling the use of pre-computed analyses that rely on mapping values. It also leads to a much cleaner implementation overall. The major user facing change is that applySignatureConversion will now replace the entry block of the region, meaning that blocks generally shouldn't be cached over calls to applySignatureConversion.

PiperOrigin-RevId: 280226936
mlir/include/mlir/Transforms/DialectConversion.h
mlir/lib/Conversion/GPUToSPIRV/GPUToSPIRV.cpp
mlir/lib/Transforms/DialectConversion.cpp
mlir/test/Transforms/test-legalizer-full.mlir
mlir/test/Transforms/test-legalizer.mlir
mlir/test/lib/TestDialect/TestPatterns.cpp