coreir
coreir copied to clipboard
Proposal: Whitelisting/Blacklisting on passes
Issue: There is the need to both specify only applying passes to certain instances/modules/generators instead of all of them.
Proposal:
- Be able to specify a filter for applying passes "--filter *" or "--filter -*"
- Add ability to mark instances/modules/generators as either whitelisted or blacklisted for a particular pass
- Have a priority ordering where instances have highest priority, and generators have lowest priority
This is vaguely similar to the positive and negative globs in https://clang.llvm.org/extra/clang-tidy/#using-clang-tidy
This is a step towards having a pass framework with custom filtering options.
Immediate usecases: -inlining of particular modules or instances -flatten-types of particular modules.