llvm / llvm/circt

[HW] Remove dead HierPathOp's

Open
#4,462 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

These were previously bulk removed during lowering, but now that they're HW operations (and useful) we can end up with thousands of dead hierpath's on a modest design without a way to remove them.

Moving/supporting InnerSymDCE in HW, as well as running mlir's SymbolDCE would be one way to address this and would perhaps remove any that became dead during the HW pipeline.

Running those passes (particularly SymbolDCE) immediately before Lowering would at least remove the ones trivially dead and could be done today (not free, but), untested if this would address the many dead hierpath's I'm seeing.

I don't know if this is problematic as-is but these have blocked DCE and similar before.

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

The issue names no files or tests. Start by locating HW HierPathOp handling and the lowering pipeline, then investigate InnerSymDCE and MLIR's SymbolDCE before lowering. Done means dead HierPathOps are removed without blocking DCE or similar passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.