Python bindinds: support functions with attributes and argument attributes
Currently, Python bindings provide support for declarting and defining MLIR functions given a list of argument and result types. Extend the support for both function declaration and function definition to handle optional function attributes and function argument attributes. Function attributes are exposed as keyword arguments on function declaration and definition calls. Function argument attributes are exposed through a special object that combines the argument type and its list of attributes. Such objects can be passed instead of bare types into the type declaration and definition calls. They can be constructed from bare types and reused in different declarations. Note that, from the beginning, Python bindings did not pass through C bindings to declare and define functions. This commit keeps the direct interaction between Python and C++. PiperOrigin-RevId: 237047561
Loading
Please sign in to comment