Re-implement StdToHandshake using applyPatternsAndFold, instead of a conversion
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 2.2k
- Forks
- 524
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 46
Description
Update: I've tried to re-implement this using the applyPatternsAndFold...-like functions. Unfortunately, it does not seem to be a "drop-in" replacement like what is currently implemented in this PR.
This is both due to that the operations expects the matched op's to be erased by the matched patterns, as well as API issue such as applyOpPatternsAndFold not taking a config argument, meaning that registerred patterns are applied for the default (10) number of iterations, whereafter applyOpPatternsAndFold will fail (due to the above). Even when hacking around this, some of the existing partial lowering functions of StandardToHandshake throw errors due to what i expect is inconsistent IR state after applyOpPatternsAndFold have run.
My suggestion is to keep the current implementation, and then have a second look when there is more well-defined support for partial lowering patterns in MLIR. WDYT?
Originally posted by @mortbopet in https://github.com/llvm/circt/issues/1538#issuecomment-900975398
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 StandardToHandshake implementation and the applyPatternsAndFold-like APIs, especially applyOpPatternsAndFold. Investigate the missing config support, pattern-erasure expectations, and failures in existing partial lowering functions. This issue is done only when a well-defined replacement for the current conversion is agreed and implemented without inconsistent IR state.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100