Revert "Since $_ANDNOT_ is not symmetric, do not sort leaves"

This commit is contained in:
Eddie Hung 2019-08-14 10:40:53 -07:00 committed by GitHub
parent 19d6b8846f
commit 0e128510c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 4 deletions

View File

@ -153,10 +153,12 @@ struct ExtractFaWorker
} }
} }
void check_partition(SigBit root, const pool<SigBit> &leaves) void check_partition(SigBit root, pool<SigBit> &leaves)
{ {
if (config.enable_ha && GetSize(leaves) == 2) if (config.enable_ha && GetSize(leaves) == 2)
{ {
leaves.sort();
SigBit A = SigSpec(leaves)[0]; SigBit A = SigSpec(leaves)[0];
SigBit B = SigSpec(leaves)[1]; SigBit B = SigSpec(leaves)[1];
@ -194,6 +196,8 @@ struct ExtractFaWorker
if (config.enable_fa && GetSize(leaves) == 3) if (config.enable_fa && GetSize(leaves) == 3)
{ {
leaves.sort();
SigBit A = SigSpec(leaves)[0]; SigBit A = SigSpec(leaves)[0];
SigBit B = SigSpec(leaves)[1]; SigBit B = SigSpec(leaves)[1];
SigBit C = SigSpec(leaves)[2]; SigBit C = SigSpec(leaves)[2];
@ -233,7 +237,7 @@ struct ExtractFaWorker
} }
} }
void find_partitions(SigBit root, const pool<SigBit> &leaves, pool<const pool<SigBit>> &cache, int maxdepth, int maxbreadth) void find_partitions(SigBit root, pool<SigBit> &leaves, pool<pool<SigBit>> &cache, int maxdepth, int maxbreadth)
{ {
if (cache.count(leaves)) if (cache.count(leaves))
return; return;
@ -289,8 +293,8 @@ struct ExtractFaWorker
continue; continue;
SigBit root = it.first; SigBit root = it.first;
const pool<SigBit> leaves = { root }; pool<SigBit> leaves = { root };
pool<const pool<SigBit>> cache; pool<pool<SigBit>> cache;
if (config.verbose) if (config.verbose)
log(" checking %s\n", log_signal(it.first)); log(" checking %s\n", log_signal(it.first));