The dialect conversion framework was enhanced to handle type
conversion automatically. OpConversionPattern already contains
a pointer to the TypeConverter. There is no need to duplicate it
in a separate subclass. This removes the only reason for a
SPIRVOpLowering subclass. It adapts to use core infrastructure
and simplifies the code.
Also added a utility function to OpConversionPattern for getting
TypeConverter as a certain subclass.
Why do we use TypeConverter here, not SPIRVTypeConverter? This makes things not consistent. E.g., in l.1014
We actually captured the type convert in l.968:
I guess the reason is spirv::getElementPtr is taking SPIRVTypeConverter, but this method is not. I would prefer to keep both method taking a same type of TypeConverter, so things will look consistently. E.g., the modification in IntLoadOpPattern and IntStoreOpPattern can be the same, but they are not now.