This is an archive of the discontinued LLVM Phabricator instance.

[mlir][Pass] Add a tablegen backend for defining Pass information
ClosedPublic

Authored by rriddle on Mar 23 2020, 5:39 PM.

Details

Summary

This will greatly simplify a number of things related to passes:

  • Enables generation of pass registration
  • Enables generation of boiler plate pass utilities
  • Enables generation of pass documentation

This revision focuses on adding the basic structure and adds support for generating the registration for passes in the Transforms/ directory. Future revisions will add more support and move more passes over.

Depends On D76573

Diff Detail

Event Timeline

rriddle created this revision.Mar 23 2020, 5:39 PM
jpienaar accepted this revision.Mar 24 2020, 2:44 PM
jpienaar marked an inline comment as done.

LG, thanks

mlir/lib/TableGen/Pass.cpp
2

Should this b TableGen (or ODS) pass related classes? Given it is not about Pass "IR side"

mlir/tools/mlir-tblgen/PassGen.cpp
32

I could have sworn I added a small helper class to automate this :)

This revision is now accepted and ready to land.Mar 24 2020, 2:44 PM
mehdi_amini accepted this revision.Mar 27 2020, 8:59 PM
mehdi_amini added inline comments.
mlir/include/mlir/TableGen/Pass.h
14

There is no vector use in this header?

This revision was automatically updated to reflect the committed changes.