Skip to content

[Seq] seq.compreg canonicalizations #6039

Open
@mortbopet

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 : i1 trivially canonicalizes to seq.compreg %i, %clk, %rst, %rv : i32
  • %ce = hw.constant 0 : i1 should, if the last seq.compreg canonicalization is accepted, be identical to the constant 0 clock canonicalization.

Metadata

Assignees

No one assigned

    Labels

    SeqInvolving the `seq` dialect

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions