llvm-project/mlir/lib/Conversion/LLVMCommon
River Riddle 676bfb2a22 [mlir] Refactor ShapedType into an interface
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
2022-01-12 14:12:09 -08:00
..
CMakeLists.txt [mlir] factor memref-to-llvm lowering out of std-to-llvm 2021-07-09 14:49:52 +02:00
ConversionTarget.cpp [mlir] replace llvm.mlir.cast with unrealized_conversion_cast 2021-07-16 15:14:09 +02:00
LoweringOptions.cpp
MemRefBuilder.cpp [mlir] Refactor ShapedType into an interface 2022-01-12 14:12:09 -08:00
MemRefDescriptor.h
Pattern.cpp [mlir] Refactor ShapedType into an interface 2022-01-12 14:12:09 -08:00
StructBuilder.cpp
TypeConverter.cpp [mlir][RFC] Add scalable dimensions to VectorType 2021-12-15 09:31:37 +00:00
VectorPattern.cpp Apply clang-tidy fixes for performance-for-range-copy to MLIR (NFC) 2022-01-02 22:19:56 +00:00