llvm / llvm/circt

[HW] Move off of mlir::ModuleOp to hw::DesignOp (or something)

Open
#1,715 2 comments 0 reactions 0 assignees View on GitHub
HW
Dominant language
C++
Stars
2.2k
Forks
524
Avg merge
3d 2h
Merged PRs (30d)
46

Description

MLIR upstream is getting progressively better support for the top level op being something other than `mlir::ModuleOp`. Given that I think we should introduce a new `hw.design` op (better suggestions welcome) to replace this.

This is mostly an idealistic cleanup, but I think it makes sense for a couple of reasons:

1) It would eliminate the confusing and annoying `ModuleOp` vs `HWModuleOp` divide.
2) It would reduce dependencies on the "mlir/IR/BuiltinOps.h" from various places.
3) It gets CIRCT into a more controlled model, where hw::ModuleOp is tied to hw::DesignOp

-Chris

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing the MLIR top-level operation support and the cited mlir/IR/BuiltinOps.h dependency. Map where mlir::ModuleOp and hw::ModuleOp are used, then define the replacement design and verify that the confusing divide is removed, dependencies are reduced, and hw::ModuleOp is tied to the new design operation.

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
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.