circt
circt copied to clipboard
[FIRRTL] Inliner: Support for ops with regions.
inlineInstances/flattenInstances:
- Walk entire body, not only top-level operations. Fixes missing instances and allows inlining them when conservatively legal.
- Reject inlining instances under when/match.
inlineInto/flattenInto:
Walk entire body using new inliningWalk method
that drives the per-operations handling but also
handles cloning "structure" operations that have
regions (when/match/layer) and managing what
should be cloned where.
This allows inlining modules that contain these operations.
Inliner now may produce errors, thread throughout.
This allows the inliner to run earlier in the pipeline, particularly before LowerLayers.
There's some follow-up commits too, but may be useful to look through this before the the "format" commit, most of the changes are here: https://github.com/llvm/circt/pull/7398/commits/f6e254bba69e00b30ef2913662f54a19f34ae86c .