This is an archive of the discontinued LLVM Phabricator instance.

[MLIR][NFC] Add FuncOp::addArgument() and FuncOp::getArgumentTypes()
ClosedPublic

Authored by jurahul on Jul 31 2020, 10:53 AM.

Diff Detail

Event Timeline

jurahul created this revision.Jul 31 2020, 10:53 AM
Herald added a project: Restricted Project. · View Herald Transcript
jurahul requested review of this revision.Jul 31 2020, 10:53 AM
rriddle accepted this revision.Jul 31 2020, 11:04 AM
rriddle added inline comments.
mlir/include/mlir/IR/FunctionSupport.h
223

This API is deceptive, as it doesn't add an argument to the type of the function itself. I would prefer we just don't add it.

This revision is now accepted and ready to land.Jul 31 2020, 11:04 AM
jurahul added inline comments.Jul 31 2020, 11:38 AM
mlir/include/mlir/IR/FunctionSupport.h
223

That is true, it does a transient update. I agree not to put it (we can also update the type, but the use cases I have seen add multiple arguments, so we will end up instantiating a lot of FunctionType's in the process which is not desirable).

jurahul updated this revision to Diff 282288.Jul 31 2020, 11:40 AM

Remove FuncOp::getArgument()

This revision was automatically updated to reflect the committed changes.