Concentrate memref descriptor manipulation logic in one place
authorAlex Zinenko <zinenko@google.com>
Thu, 14 Nov 2019 08:48:41 +0000 (00:48 -0800)
committerA. Unique TensorFlower <gardener@tensorflow.org>
Thu, 14 Nov 2019 08:49:12 +0000 (00:49 -0800)
commitee5c2256ef31fefc92ad59f78b0649b145dc0eb0
tree291dc6c6f3248c01da15931b9a887b0497af28c7
parentd1c99e10d05508855b51ec391c8f1c4a7f4aa14b
Concentrate memref descriptor manipulation logic in one place

Memref descriptor is becoming increasingly complex. Memrefs are manipulated by
multiple standard instructions, each of which has a non-trivial lowering to the
LLVM dialect. This leads to verbose code that manipulates the descriptors
exposing the internals of insert/extractelement opreations. Implement a wrapper
class that contains a memref descriptor and provides semantically named methods
that build the primitive IR operations instead.

PiperOrigin-RevId: 280371225
mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp