This is an archive of the discontinued LLVM Phabricator instance.

[mlir][python] provide access to function argument/result attributes
ClosedPublic

Authored by ftynse on Sep 29 2021, 12:42 PM.

Details

Summary

Without this change, these attributes can only be accessed through the generic
operation attribute dictionary provided the caller knows the special operation
attribute names used for this purpose. Add some Python wrapping to support this
use case.

Also provide access to function arguments usable inside the function along with
a couple of quality-of-life improvements in using block arguments (function
arguments being the arguments of its entry block).

Diff Detail

Event Timeline

ftynse created this revision.Sep 29 2021, 12:42 PM
ftynse requested review of this revision.Sep 29 2021, 12:42 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 29 2021, 12:42 PM
stellaraccident accepted this revision.Sep 29 2021, 9:18 PM

Nice improvements. Thank you.

This revision is now accepted and ready to land.Sep 29 2021, 9:18 PM