This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Resolve TODO and use the pass argument instead of the TypeID for registration
ClosedPublic

Authored by rriddle on May 4 2021, 6:37 PM.

Details

Summary

This removes the need to construct a pass during registration (to get the TypeID), and it also simplifies various pieces of code that interact with the pass registry.

Diff Detail

Event Timeline

rriddle created this revision.May 4 2021, 6:37 PM
rriddle requested review of this revision.May 4 2021, 6:37 PM
mehdi_amini added inline comments.May 11 2021, 4:53 PM
mlir/lib/Pass/PassRegistry.cpp
113

If there is already an entry, can we check that the TypeID is matching?

rriddle marked an inline comment as done.May 11 2021, 6:26 PM
mehdi_amini accepted this revision.May 21 2021, 12:28 PM
mehdi_amini added inline comments.
mlir/lib/Pass/PassRegistry.cpp
120

This isn't a sensitive code path, I'd make it a report_fatal_error and not guard it with ifndef NDEBUG

This revision is now accepted and ready to land.May 21 2021, 12:28 PM
This revision was automatically updated to reflect the committed changes.
rriddle marked an inline comment as done.