[mlir][bufferize] Fix buffer promotion to stack for index types
authorStephan Herhut <herhut@google.com>
Thu, 12 Nov 2020 16:09:57 +0000 (17:09 +0100)
committerStephan Herhut <herhut@google.com>
Fri, 13 Nov 2020 08:23:36 +0000 (09:23 +0100)
commit4a771108ac5ceeae6119185ae52ab6f5e6af2da1
tree4e961442e0e60998934e6326e4d2aeaf0041a3a5
parent5da2423bc02f83598405fdfc532de0faa3502ec7
[mlir][bufferize] Fix buffer promotion to stack for index types

The index type does not have a bitsize and hence the size of corresponding allocations cannot be computed.  Instead, the promotion pass now has an explicit option to specify the size of index.

Differential Revision: https://reviews.llvm.org/D91360
mlir/include/mlir/Transforms/Passes.h
mlir/include/mlir/Transforms/Passes.td
mlir/lib/Transforms/BufferOptimizations.cpp
mlir/test/Transforms/promote-buffers-to-stack.mlir