Add FuncOp::eraseArgument
authorSean Silva <silvasean@google.com>
Wed, 13 Nov 2019 18:59:24 +0000 (10:59 -0800)
committerA. Unique TensorFlower <gardener@tensorflow.org>
Wed, 13 Nov 2019 18:59:55 +0000 (10:59 -0800)
commit486f2122cde3a55b64c2f0e594528782ce42c22b
tree686debe0bbd9a132f556fb46ee4ee71f326de4b0
parentd985c7488393a181f30b0faeb3083ec0c27983eb
Add FuncOp::eraseArgument

This is a quite complex operation that users are likely to attempt to write
themselves and get wrong (citation: users=me).

Ideally, we could pull this into FunctionLike, but for now, the
FunctionType rewriting makes it FuncOp specific. We would need some hook
for rewriting the function type (which for LLVM's func op, would need to
rewrite the underlying LLVM type).

PiperOrigin-RevId: 280234164
mlir/include/mlir/IR/Function.h
mlir/lib/IR/Function.cpp
mlir/test/IR/test-func-erase-arg.mlir [new file with mode: 0644]
mlir/test/IR/test-func-set-type.mlir [new file with mode: 0644]
mlir/test/lib/IR/CMakeLists.txt
mlir/test/lib/IR/TestFunc.cpp [new file with mode: 0644]