forked from OSchip/llvm-project
676bfb2a22
ShapedType was created in a time before interfaces, and is one of the earliest type base classes in the ecosystem. This commit refactors ShapedType into an interface, which is what it would have been if interfaces had existed at that time. The API of ShapedType and it's derived classes are essentially untouched by this refactor, with the exception being the API surrounding kDynamicIndex (which requires a sole home). For now, the API of ShapedType and its name have been kept as consistent to the current state of the world as possible (to help with potential migration churn, among other reasons). Moving forward though, we should look into potentially restructuring its API and possible its name as well (it should really have "Interface" at the end like other interfaces at the very least). One other potentially interesting note is that I've attached the ShapedType::Trait to TensorType/BaseMemRefType to act as mixins for the ShapedType API. This is kind of weird, but allows for sharing the same API (i.e. preventing API loss from the transition from base class -> Interface). This inheritance doesn't affect any of the derived classes, it is just for API mixin. Differential Revision: https://reviews.llvm.org/D116962 |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
ConversionTarget.cpp | ||
LoweringOptions.cpp | ||
MemRefBuilder.cpp | ||
MemRefDescriptor.h | ||
Pattern.cpp | ||
StructBuilder.cpp | ||
TypeConverter.cpp | ||
VectorPattern.cpp |