Avoid dyn_cast to ShapedType
authorGeoffrey Martin-Noble <gcmn@google.com>
Wed, 29 May 2019 22:51:17 +0000 (15:51 -0700)
committerMehdi Amini <joker.eph@gmail.com>
Sun, 2 Jun 2019 03:09:22 +0000 (20:09 -0700)
commit9ebab7bc30bf7cd5fcad13037f76991a6311ad78
treec61718d2acc774b09397ead9a0f9c83c23304b1d
parent66e84bf88c7887b6eca76967f5853dc0e9b24eeb
Avoid dyn_cast to ShapedType

    ShapedType just indicates shape/rank/element semantics. It's generally not useful for other type checking. This check already checks for vector or tensor type, so we can use a direct cast if we check those first.

    Related to making MemRefType a subclass of ShapedType

--

PiperOrigin-RevId: 250583231
mlir/lib/Quantizer/Configurations/FxpMathConfig.cpp