From: whitequark Date: Tue, 12 Nov 2019 00:15:43 +0000 (+0000) Subject: flowmap: when doing mincut, ensure source is always in X, not X̅. X-Git-Tag: working-ls180~967^2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c68722818a09ce541c380178ff17e548db9c897d;p=yosys.git flowmap: when doing mincut, ensure source is always in X, not X̅. Fixes #1475. --- diff --git a/passes/techmap/flowmap.cc b/passes/techmap/flowmap.cc index 96eee45db..a2ad87f7d 100644 --- a/passes/techmap/flowmap.cc +++ b/passes/techmap/flowmap.cc @@ -394,7 +394,7 @@ struct FlowGraph pair, pool> edge_cut() { - pool x, xi; + pool x = {source}, xi; // X and X̅ in the paper NodePrime source_prime = {source, true}; pool visited; @@ -437,6 +437,7 @@ struct FlowGraph for (auto collapsed_node : collapsed[sink]) xi.insert(collapsed_node); + log_assert(x[source] && !xi[source]); log_assert(!x[sink] && xi[sink]); return {x, xi}; }