This is an archive of the discontinued LLVM Phabricator instance.

[mlir][irdl] Add `irdl.c_pred`
ClosedPublic

Authored by math-fehr on Jun 6 2023, 12:14 PM.

Details

Summary

irdl.c_pred is an attribute constraint defined by a C++ predicate.
Contrary to the other constraints, this operation cannot be used in
dialects that are registered at runtime. Its principal use is to
share dialect definitions that are defined in C++ or ODS.

Diff Detail

Event Timeline

math-fehr created this revision.Jun 6 2023, 12:14 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 6 2023, 12:14 PM
math-fehr requested review of this revision.Jun 6 2023, 12:14 PM
math-fehr updated this revision to Diff 529054.Jun 6 2023, 3:01 PM

Fix documentation

math-fehr retitled this revision from [mlir][irdl] Add `irdl.cpred` to [mlir][irdl] Add `irdl.c_pred`.Jun 6 2023, 3:02 PM
math-fehr edited the summary of this revision. (Show Details)
Mogball accepted this revision.Jun 6 2023, 3:26 PM
Mogball added inline comments.
mlir/include/mlir/Dialect/IRDL/IR/IRDLOps.td
429

align the names? IRDL_CPredOp?

461
This revision is now accepted and ready to land.Jun 6 2023, 3:26 PM
math-fehr updated this revision to Diff 529062.Jun 6 2023, 3:38 PM

Address comments

I also fixed other operation names, as they were inconsistent

math-fehr updated this revision to Diff 529068.Jun 6 2023, 3:47 PM

Revert change of other operation names

math-fehr marked 2 inline comments as done.Jun 6 2023, 3:48 PM

I'll fix the name of the other IRDL operations (as they are inconsistent) in another patch to make this cleaner!

math-fehr updated this revision to Diff 529544.Jun 8 2023, 2:54 AM

Update to main

This revision was automatically updated to reflect the committed changes.