diff --git a/.vscode/settings.json b/.vscode/settings.json index 3af0d67b1..4556a5adb 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -71,5 +71,6 @@ "variant": "cpp", "algorithm": "cpp", "*.inc": "cpp" - } + }, + "cmake.sourceDirectory": "/Users/akashlevy/Documents/preqorsor/third_party/yosys/abc" } diff --git a/passes/techmap/abc.cc b/passes/techmap/abc.cc index 45541df6c..0ce0a1b80 100644 --- a/passes/techmap/abc.cc +++ b/passes/techmap/abc.cc @@ -2636,7 +2636,8 @@ struct AbcPass : public Pass { ConcurrentQueue> work_queue(num_worker_threads); ConcurrentQueue> work_finished_queue; ConcurrentStack process_pool; - ThreadPool worker_threads(num_worker_threads, [&](int){ + if (num_worker_threads > 0) { + ThreadPool worker_threads(num_worker_threads, [&](int){ while (std::optional> work = work_queue.pop_front()) { // Only the `run_abc` component is safe to touch here! @@ -2644,6 +2645,7 @@ struct AbcPass : public Pass { work_finished_queue.push_back(std::move(*work)); } }); + } int state_index = 0; int next_state_index_to_process = 0; std::vector> work_finished_by_index;