17 #include "mlir/IR/MLIRContext.h"
18 #include "mlir/Pass/Pass.h"
20 #define DEBUG_TYPE "arc-print-cost-model"
24 #define GEN_PASS_DEF_PRINTCOSTMODEL
25 #include "circt/Dialect/Arc/ArcPasses.h.inc"
29 using namespace circt;
33 struct PrintCostModelPass
34 :
public arc::impl::PrintCostModelBase<PrintCostModelPass> {
35 void runOnOperation()
override;
39 void PrintCostModelPass::runOnOperation() {
42 for (
auto moduleOp : getOperation().getOps<hw::HWModuleOp>()) {
43 moduleOp.walk([&](Operation *op) { statVars += arcCostModel.
getCost(op); });
55 return std::make_unique<PrintCostModelPass>();
OperationCosts getCost(Operation *op)
std::unique_ptr< mlir::Pass > createPrintCostModelPass()
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
size_t vectorizeOpsBodyCost