Merge pull request #184 from YosysHQ/fix_183

common/chain_utils: Don't allow overlapping chains
This commit is contained in:
David Shah 2018-12-19 10:54:44 +00:00 committed by GitHub
commit c46a22cb7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,6 +51,7 @@ std::vector<CellChain> find_chains(const Context *ctx, F1 cell_type_predicate, F
CellChain chain; CellChain chain;
CellInfo *end = start; CellInfo *end = start;
while (end != nullptr) { while (end != nullptr) {
if (chained.insert(end->name).second)
chain.cells.push_back(end); chain.cells.push_back(end);
end = get_next(ctx, end); end = get_next(ctx, end);
} }