[Seq] `seq.compreg` canonicalizations
Open
Nobody has claimed this yet.
Seq
- Dominant language
- C++
- Stars
- 2.2k
- Forks
- 524
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 46
Description
I'd like to see some canonicalizations for the generic seq register operations.
seq.compreg
Should we inherit the canonicalizations currently defined for FirRegOp?
- Constant 0 reset: drop reset value and reset signal from the op
- Feedback register OR constant 1 clock: replace with the reset value if present, else replace with constant zero
- Constant 1 reset: replace with reset value
- Constant 0 clock: replace with reset value if present, else constant 0.
seq.compreg.ce
In case of constant clock-enable inputs, what would the following canoncalize to?
%r = seq.compreg.ce %i, %clk, %ce, %rst, %rv : i32
%ce = hw.constant 1 : i1trivially canonicalizes toseq.compreg %i, %clk, %rst, %rv : i32%ce = hw.constant 0 : i1should, if the lastseq.compregcanonicalization is accepted, be identical to the constant 0 clock canonicalization.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the existing FirRegOp canonicalizations and the seq.compreg and seq.compreg.ce operation definitions. Resolve the listed constant reset, clock, and clock-enable cases, then verify that each agreed canonicalization is covered by the relevant tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100