mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-26 01:56:06 +00:00

This commit adds builders of the form ``` static void build(..., [TypeRange resultTypes], ValueRange operands, const Properties &properties, ArrayRef<NamedAttribute> discardableAttributes = {}, [unsigned numRegions]); ``` to go alongside the existing result/operands/[inherent + discardable attribute list] collective builders. This change is intended to support a refactor to the declarative rewrite engine to make it populate the `Properties` struct instead of creating a `DictionaryAttr`, thus enabling rewrite rules to handle non-`Attribute` properties. More generally, this means that generic code that would previously call `getAttrs()` to blend together inherent and discardable attributes can now use `getProperties()` and `getDiscardableAttrs()` separately, thus removing the need to serialize everything into a temporary `DictionaryAttr`.