mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-24 17:16:05 +00:00

For cases where we can automatically construct the Attribute allow for more user-friendly input. This is consistent with C++ builder generation as well choice of which single builder to generate here (most specialized/user-friendly). Registration of attribute builders from more pythonic input is all Python side. The downside is that * extra checking to see if user provided a custom builder in op builders, * the ODS attribute name is load bearing upside is that * easily change these/register dialect specific ones in downstream projects, * adding support/changing to different convenience builders are all along with the rest of the convenience functions in Python (and no additional changes to tablegen file or recompilation needed); Allow for both building with Attributes as well as raw inputs. This change should therefore be backwards compatible as well as allow for avoiding recreating Attribute where already available. Differential Revision: https://reviews.llvm.org/D139568