Page MenuHomePhabricator

Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline

[MLIR][PDL] Add support for representing and lowering negated constraints

Authored by martin-luecke on Jun 27 2023, 6:55 AM.



This commit enables modelling negation of native constraints.

This is accomplished through an attribute isNegated on the operations pdl.apply_native_constraint and pdl_interp.apply_constraint and according adjustments to the conversion in the ConvertPDLToPDLInterpPass.

Diff Detail

Event Timeline

martin-luecke created this revision.Jun 27 2023, 6:55 AM
Herald added a project: Restricted Project. · View Herald Transcript
martin-luecke requested review of this revision.Jun 27 2023, 6:55 AM
Mogball accepted this revision.Jun 29 2023, 9:43 AM
Mogball added inline comments.

please fit this into a line 80 characters wide


Why did this need to get defined?

This revision is now accepted and ready to land.Jun 29 2023, 9:43 AM

address comments

martin-luecke marked 3 inline comments as done.Aug 24 2023, 6:27 AM

Thank you for the comments @Mogball

I do not have commit priviledges, so if you are happy with the current state I would appreciate it if you could commit on my behalf.


The error I get without this is along the lines of

llvm-project/llvm/include/llvm/ADT/DenseMapInfo.h:267:44: error: ‘getHashValue’ is not a member of ‘llvm::DenseMapInfo<bool, void>’
  267 |         DenseMapInfo<EltType>::getHashValue(std::get<I>(values)),

i.e. the correct hash function for this key could not be found. I added this as a fix, similar to the other structs defined here that have a boolean as part of their key.