This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Support attributes in `matchPattern`
ClosedPublic

Authored by kuhar on Sep 4 2023, 9:11 PM.

Details

Summary

The primary motivation is to we have a simple mechanism to extract
values from attributes in folders and canon patterns without having to
re-fold constants or write nested conditions over attribute types.

Matching over attributes composes especially well with fold adaptors.

Update folds in Arith and SPIRV dialects to match over attributes, where
applicable.

Diff Detail

Event Timeline

kuhar created this revision.Sep 4 2023, 9:11 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 4 2023, 9:11 PM
kuhar requested review of this revision.Sep 4 2023, 9:11 PM
mehdi_amini accepted this revision.Sep 4 2023, 10:46 PM

FYI: we're using GitHub pull-requests now.

This revision is now accepted and ready to land.Sep 4 2023, 10:46 PM
zero9178 accepted this revision.Sep 5 2023, 2:21 AM
This revision was landed with ongoing or failed builds.Sep 5 2023, 11:55 AM
This revision was automatically updated to reflect the committed changes.