Skip to content

Commit 66e46be

Browse files
committed
Review comments
1 parent f5daa23 commit 66e46be

File tree

4 files changed

+6
-26
lines changed

4 files changed

+6
-26
lines changed

include/circt/Dialect/FIRRTL/FIRRTLOpInterfaces.h

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -85,28 +85,6 @@ struct PortInfo {
8585
annotations(annos), domains(domains) {}
8686
};
8787

88-
inline bool operator==(const PortInfo &lhs, const PortInfo &rhs) {
89-
if (lhs.name != rhs.name)
90-
return false;
91-
if (lhs.type != rhs.type)
92-
return false;
93-
if (lhs.direction != rhs.direction)
94-
return false;
95-
if (lhs.sym != rhs.sym)
96-
return false;
97-
if (lhs.loc != rhs.loc)
98-
return false;
99-
if (lhs.annotations != rhs.annotations)
100-
return false;
101-
if (lhs.domains != rhs.domains)
102-
return false;
103-
return true;
104-
}
105-
106-
inline bool operator!=(const PortInfo &lhs, const PortInfo &rhs) {
107-
return !(lhs == rhs);
108-
}
109-
11088
enum class ConnectBehaviorKind {
11189
/// Classic FIRRTL connections: last connect 'wins' across paths;
11290
/// conditionally applied under 'when'.

lib/Dialect/FIRRTL/Transforms/InferDomains.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ using DomainTypeID = size_t;
102102
/// type ID, which in this pass is the canonical way to reference the type
103103
/// of a domain.
104104
namespace {
105-
struct CircuitDomainInfo {
105+
class CircuitDomainInfo {
106+
public:
106107
CircuitDomainInfo(CircuitOp circuit) { processCircuit(circuit); }
107108

108109
ArrayRef<DomainOp> getDomains() const { return domainTable; }
@@ -302,6 +303,7 @@ Term *find(Term *x) {
302303
LogicalResult unify(Term *lhs, Term *rhs);
303304

304305
LogicalResult unify(VariableTerm *x, Term *y) {
306+
assert(!x->leader);
305307
x->leader = y;
306308
return success();
307309
}

lib/Firtool/Firtool.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ LogicalResult firtool::populatePreprocessTransforms(mlir::PassManager &pm,
4949
pm.nest<firrtl::CircuitOp>().nest<firrtl::FModuleOp>().addPass(
5050
firrtl::createLowerIntrinsics());
5151

52-
if (auto mode = toInferDomainsPassMode(opt.getDomainMode())) {
52+
if (auto mode = toInferDomainsPassMode(opt.getDomainMode()))
5353
pm.nest<firrtl::CircuitOp>().addPass(firrtl::createInferDomains({*mode}));
54-
}
54+
5555
return success();
5656
}
5757

test/Dialect/FIRRTL/infer-domains-errors.mlir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ firrtl.circuit "DomainCrossOnPort" {
1515

1616
// -----
1717

18-
// Illegal domain crossing - connect op.
18+
// Illegal domain crossing via connect op.
1919
firrtl.circuit "IllegalDomainCrossing" {
2020
firrtl.domain @ClockDomain
2121
firrtl.module @IllegalDomainCrossing(

0 commit comments

Comments
 (0)