llvm / llvm/circt

[circt-reduce] Use upstream MlirReduceLib instead of reimplementing

Open
#6,389 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

@fabianschuiki might have better insight here, but AFAICT, there is no reason for CIRCT to [reimplement a reduction algorithm/bookkeeping](https://github.com/llvm/circt/blob/main/tools/circt-reduce/circt-reduce.cpp) when upstream provides [MlirReduceLib/`mlirReduceMain`](https://github.com/llvm/llvm-project/blob/main/mlir/tools/mlir-reduce/mlir-reduce.cpp#L40C2-L40C2).

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 tools/circt-reduce/circt-reduce.cpp and compare its reduction algorithm and bookkeeping with upstream MlirReduceLib and mlirReduceMain in the linked MLIR source. Determine how CIRCT can use the upstream entry point, then verify that circt-reduce builds and retains its existing behavior without the duplicate implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers, tooling
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.