[MLIR] Introduce an op trait that defines a new scope for auto allocation
authorUday Bondhugula <uday@polymagelabs.com>
Thu, 9 Apr 2020 09:46:24 +0000 (15:16 +0530)
committerUday Bondhugula <uday@polymagelabs.com>
Fri, 10 Apr 2020 06:35:52 +0000 (12:05 +0530)
commitdb054d711518b6527048aa06196e443ff2e1dada
tree4c311327ac03dde6e06420f44b6d0c7a7a2c0fa1
parent57d2d48399b63c0ef1dda490fdaf28efbb80c2c0
[MLIR] Introduce an op trait that defines a new scope for auto allocation

Introduce a new operation property / trait (AutomaticAllocationScope)
for operations with regions that define a new scope for automatic allocations;
such allocations (typically realized on stack) are automatically freed when
control leaves such ops' regions. std.alloca's are freed at the closest
surrounding op that has this trait. All FunctionLike operations should normally
have this trait.

Differential Revision: https://reviews.llvm.org/D77787
mlir/docs/Traits.md
mlir/include/mlir/Dialect/GPU/GPUOps.td
mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
mlir/include/mlir/Dialect/SPIRV/SPIRVStructureOps.td
mlir/include/mlir/Dialect/StandardOps/IR/Ops.td
mlir/include/mlir/IR/Function.h
mlir/include/mlir/IR/OpBase.td
mlir/include/mlir/IR/OpDefinition.h
mlir/lib/Dialect/StandardOps/IR/Ops.cpp
mlir/test/IR/invalid-ops.mlir