llvm / llvm/circt

[FIRRTL] Enable access to IMDCE at smaller granularities

Open
#10,055 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement FIRRTL Reducer
Dominant language
C++
Stars
2.2k
Forks
524
Avg merge
3d 2h
Merged PRs (30d)
46

Description

I've turned on IMDCE in circt-reduce for FIRRTL. However, this is a very heavy hammer. E.g., I have a circuit with dead code. However, when I run it through IMDCE it deletes essentially everything. In order for this to be effective in the reducer, there needs to be a more targeted way of applying this.

There are a couple of features that would help with this:

  1. Being able to run IMDCE on a per-module basis.
  2. Being able to run IMDCE on only specific signals. E.g., on a per-port basis.

Likely this would entail breaking the main IMDCE pass into smaller units (or utilities) that could be reused.

There are alternatives here which involve selective application of inner symbols to block removal. However, that's a bit rough.

h/t @uenoku for the idea.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the existing IMDCE integration in circt-reduce and trace how the FIRRTL pass is invoked. Determine how the current pass can be split into reusable units, then verify that reduction can target an individual module or selected signals without removing unrelated circuit content.

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
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.