[MLIR] Introduce std.alloca op
authorUday Bondhugula <uday@polymagelabs.com>
Sun, 22 Mar 2020 15:50:21 +0000 (21:20 +0530)
committerUday Bondhugula <uday@polymagelabs.com>
Tue, 7 Apr 2020 10:15:07 +0000 (15:45 +0530)
commit7023f4b4cb0157d95d98f32ace247acd9fc7b80a
treed2fb14a37cd502db5b3d185e35f4c2eb00559b39
parent6aabb109becfee37126ff7db3d41a41b5779f359
[MLIR] Introduce std.alloca op

Introduce the alloca op for stack memory allocation. When converting to the
LLVM dialect, this is lowered to an llvm.alloca. Refactor the std to
llvm conversion for alloc op to reuse with alloca. Drop useAlloca option
with alloc op lowering.

Differential Revision: https://reviews.llvm.org/D76602
mlir/include/mlir/Conversion/Passes.td
mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVMPass.h
mlir/include/mlir/Dialect/StandardOps/IR/Ops.td
mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
mlir/lib/Dialect/StandardOps/IR/Ops.cpp
mlir/test/Conversion/StandardToLLVM/convert-dynamic-memref-ops.mlir
mlir/test/Conversion/StandardToLLVM/convert-static-memref-ops.mlir
mlir/test/IR/memory-ops.mlir
mlir/test/Transforms/canonicalize.mlir