Add `i0` support - tracking issue
- Dominant language
- C++
- Stars
- 2.2k
- Forks
- 524
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 46
Description
Following the 21/09/2022 ODM, a consensus was reached on moving forward with supporting zero-width values in the core RTL dialects.
If you are aware of any location which currently performs special case logic for zero-width values and/or needs consideration during this work, **please** add it to the list at the end of the issue. Ensures that we don't miss it and that people don't have to spend extra time trawling through the codebase.
- [x] Allow zero-width values in `HWIntegerType`
- [x] Allow zero-width indexes to singleton arrays #3985
- [x] #3983
- [x] Zero-width constant support
- [ ] Fix any location which currently contains special-case logic for zero-width integers
- Related: https://github.com/llvm/circt/issues/2909
- [ ] ... fix any location which supports parametric `hw` int types and does not consider the possibility of resolved types being zero-width
- [x] Add pruning pass (continue #3935). Said pass should prune all of the `i0` logic from inside modules, but keep `i0` module ports. Summarizing the ODM, a pass-based approach is preferable due to:
- Testability
- Traceability - any value pruned can be replaced with an sv comment stating the former existence of that value.
- We already have passes which are expected to be run for putting the IR in a legal state prior to emission (--hw-legalize-modules).
- [ ] https://github.com/llvm/circt/issues/4018
- [x] Include pruning pass in a predefined prepare-for-export pass pipeline alongside passes such as `--hw-legalize-modules`.
- [ ] Fix canonicalizer
### Locations to modify:
(add stuff...).
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing the open checklist, the 21/09/2022 ODM decision, and related issues #2909 and #4018, then inspect the remaining zero-width handling and canonicalizer work. Done means resolving the unchecked special cases, parametric HW integer handling, canonicalizer support, and ensuring the pruning pass is included in the prepare-for-export pipeline.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100