Skip to content

Commit d5a833c

Browse files
committed
Clean up
1 parent c920473 commit d5a833c

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

lib/Dialect/FIRRTL/Transforms/InferDomains.cpp

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1161,15 +1161,18 @@ RowTerm *InferModuleDomains::getDomainAssociationAsRow(Value value) {
11611161
}
11621162

11631163
// If the term is already a row, return it.
1164-
auto *row = dyn_cast<RowTerm>(term);
1165-
if (row)
1164+
if (auto *row = dyn_cast<RowTerm>(term))
11661165
return row;
11671166

11681167
// Otherwise, unify the term with a fresh row of domains.
1169-
row = allocateRow();
1170-
auto result = unify(row, term);
1171-
assert(result.succeeded());
1172-
return row;
1168+
if (auto *var = dyn_cast<VariableTerm>(term)) {
1169+
auto *row = allocateRow();
1170+
solve(var, row);
1171+
return row;
1172+
}
1173+
1174+
assert(false && "unhandled term type");
1175+
return nullptr;
11731176
}
11741177

11751178
Term *InferModuleDomains::getDomainAssociation(Value value) {

0 commit comments

Comments
 (0)