llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
29.08k stars 11.99k forks source link

[PDL] Support optional attribute matching and rewriting #57015

Open Mogball opened 2 years ago

Mogball commented 2 years ago

pdl.attr doesn't support optional attributes. It should with a syntax like

%optionalAttr = pdl.attr ?

The optionality should be expressed in the type system.

llvmbot commented 2 years ago

@llvm/issue-subscribers-mlir-core