HomePhabricator

[MLIR] Move eraseArguments and eraseResults to FunctionLike

Authored by mikeurbach on Oct 22 2020, 10:39 AM.

Description

[MLIR] Move eraseArguments and eraseResults to FunctionLike

Previously, they were only defined for FuncOp.

To support this, FunctionLike needs a way to get an updated type
from the concrete operation. This adds a new hook for that purpose,
called getTypeWithoutArgsAndResults.

For now, FunctionLike continues to assume the type is
FunctionType, and concrete operations that use another type can hide
the getType, setType, and getTypeWithoutArgsAndResults methods.

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D90363