[FIRRTL][Seq] Move uninitialized firreg canonicalizations into LowerSeqToSV
- Dominant language
- C++
- Stars
- 2.2k
- Forks
- 524
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 46
Description
https://github.com/llvm/circt/pull/4060 and https://github.com/llvm/circt/pull/4510 implement canonicalizations to replace uninitialized fir reg with 0. These canonicalizations are selecting values for uninitialized registers, which should be in LowerSeqToSV.
More precisely there are 3 places where we choose concrete values for unitialized registers:
1. FIRRTL canonizlier https://github.com/llvm/circt/blob/ed1698f1d19ec54f42e9bd4f69fe0037191ede54/lib/Dialect/FIRRTL/FIRRTLFolds.cpp#L2284-L2289
2. FIRRTL IMCP & LowerToHW
IMCP replaces uninitialized values with invalid value op. Currently invalid value ops are just lowered into 0.
3. Seq canonicalizer
[Seq canonicalizer](https://github.com/llvm/circt/pull/4060) also replaces unwritten registers with 0.
Contributor guide
No contributing guide indexed for this repository
Research direction
Read the three cited areas: FIRRTL/lib/Dialect/FIRRTL/FIRRTLFolds.cpp, FIRRTL IMCP and LowerToHW, and the Seq canonicalizer from pull request 4060. Trace how uninitialized register values are selected and how LowerSeqToSV handles them; done means those concrete-value choices are consistently located in LowerSeqToSV.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100