Skip to content

Commit 4da5e2d

Browse files
committed
[HW] Address review comments.
1 parent 5d2d09f commit 4da5e2d

4 files changed

Lines changed: 144 additions & 93 deletions

File tree

include/circt/Dialect/HW/Passes.td

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -148,25 +148,20 @@ def HWBypassInnerSymbols : Pass<"hw-bypass-inner-symbols", "hw::HWModuleOp"> {
148148
];
149149
}
150150

151-
def HWConstProp : Pass<
152-
"hw-constprop", "mlir::ModuleOp"
153-
> {
151+
def HWIMConstProp : Pass<"hw-imconstprop", "mlir::ModuleOp"> {
154152
let summary = "Inter-module constant propagation";
155153
let description = [{
156154
This pass performs inter-module constant propagation for HW modules.
157155
It propagates constant values across module boundaries through instances,
158156
and folds operations with constant operands.
159157
}];
160-
let dependentDialects = [
161-
"comb::CombDialect",
162-
"hw::HWDialect"
163-
];
158+
let dependentDialects = ["comb::CombDialect", "hw::HWDialect"];
164159
let statistics = [
165-
Statistic<"numValuesFolded", "num-values-folded",
166-
"Number of values folded to a constant">,
167-
Statistic<"numOpsErased", "num-ops-erased",
168-
"Number of dead ops erased">,
169-
]
160+
Statistic<"numValuesFolded", "num-values-folded",
161+
"Number of values folded to a constant">,
162+
Statistic<"numOpsErased", "num-ops-erased",
163+
"Number of dead ops erased">
164+
];
170165
}
171166

172167
#endif // CIRCT_DIALECT_HW_PASSES_TD

lib/Dialect/HW/Transforms/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ add_circt_dialect_library(CIRCTHWTransforms
22
HWAggregateToComb.cpp
33
HWBypassInnerSymbols.cpp
44
HWParameterizeConstantPorts.cpp
5-
HWConstProp.cpp
5+
HWIMConstProp.cpp
66
HWPrintInstanceGraph.cpp
77
HWSpecialize.cpp
88
PrintHWModuleGraph.cpp

0 commit comments

Comments
 (0)