Make ConvertStandardToLLVMPass extendable with other patterns
authorAlex Zinenko <zinenko@google.com>
Thu, 4 Jul 2019 11:41:02 +0000 (04:41 -0700)
committerjpienaar <jpienaar@google.com>
Thu, 4 Jul 2019 14:53:19 +0000 (07:53 -0700)
commit9a1b6fec79c3ae2bdeab06c887adc896daf95eb0
tree17a8687319f6cbe4ae7a707854928452ab8914ee
parent82679d471814b04396358a83c9baafe2c55499f9
Make ConvertStandardToLLVMPass extendable with other patterns

Extend the LLVM lowering pass to accept callbacks that construct an instance of
(a subclass of) LLVMTypeConverter and populate a list of conversion patterns.
These callbacks will be called when the pass processes a module and their
results will be used to set up the dialect conversion infrastructure.  Clients
can now provide additional conversion patterns to avoid the need of
materializing type conversions between LLVM and other types.

PiperOrigin-RevId: 256532415
mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVMPass.h
mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp