llvm-project/mlir/lib
Nicolas Vasilache 4911978f7e [MLIR] Value types for AffineXXXExpr
This CL makes AffineExprRef into a value type.

Notably:
1. drops llvm isa, cast, dyn_cast on pointer type and uses member functions on
the value type. It may be possible to still use classof  (in a followup CL)
2. AffineBaseExprRef aggressively casts constness away: if we mean the type is
immutable then let's jump in with both feet;
3. Drop implicit casts to the underlying pointer type because that always
results in surprising behavior and is not needed in practice once enough
cleanup has been applied.

The remaining negative I see is that we still need to mix operator. and
operator->. There is an ugly solution that forwards the methods but that ends
up duplicating the class hierarchy which I tried to avoid as much as
possible. But maybe it's not that bad anymore since AffineExpr.h would still
contain a single class hierarchy (the duplication would be impl detail in.cpp)

PiperOrigin-RevId: 216188003
2019-03-29 13:24:31 -07:00
..
Analysis [MLIR] Value types for AffineXXXExpr 2019-03-29 13:24:31 -07:00
IR [MLIR] Value types for AffineXXXExpr 2019-03-29 13:24:31 -07:00
Parser [MLIR] Value types for AffineXXXExpr 2019-03-29 13:24:31 -07:00
Transforms [MLIR] Value types for AffineXXXExpr 2019-03-29 13:24:31 -07:00