From 45bfe26f5f906c9c847ba2bd328413746a2c869c Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Sun, 3 Mar 2013 13:18:37 +0100 Subject: Minor hotfixes (mostly gcc build fixes) --- kernel/select.cc | 2 ++ kernel/show.cc | 2 ++ libs/subcircuit/subcircuit.cc | 4 ++++ passes/opt/opt_muxtree.cc | 2 ++ passes/opt/opt_rmunused.cc | 2 ++ 5 files changed, 12 insertions(+) diff --git a/kernel/select.cc b/kernel/select.cc index f75737ad..31c0d488 100644 --- a/kernel/select.cc +++ b/kernel/select.cc @@ -22,6 +22,8 @@ #include #include +using RTLIL::id2cstr; + static std::vector work_stack; static bool match_ids(RTLIL::IdString id, std::string pattern) diff --git a/kernel/show.cc b/kernel/show.cc index 7c3f418b..6db963b2 100644 --- a/kernel/show.cc +++ b/kernel/show.cc @@ -23,6 +23,8 @@ #include #include +using RTLIL::id2cstr; + #undef CLUSTER_CELLS_AND_PORTBOXES struct ShowWorker diff --git a/libs/subcircuit/subcircuit.cc b/libs/subcircuit/subcircuit.cc index 782040be..2c6f3d82 100644 --- a/libs/subcircuit/subcircuit.cc +++ b/libs/subcircuit/subcircuit.cc @@ -1274,6 +1274,10 @@ class SubCircuit::SolverWorker const std::string &graphId = graph_it.first; const auto &graph = graph_it.second.graph; int node2 = adj_it.first; + + if (node1 == node2) + continue; + NodeSet pair(graphId, node1, node2); if (usedPairs.count(pair) > 0) diff --git a/passes/opt/opt_muxtree.cc b/passes/opt/opt_muxtree.cc index 9d622d6a..5602b5ee 100644 --- a/passes/opt/opt_muxtree.cc +++ b/passes/opt/opt_muxtree.cc @@ -27,6 +27,8 @@ #include #include +using RTLIL::id2cstr; + struct OptMuxtreeWorker { RTLIL::Design *design; diff --git a/passes/opt/opt_rmunused.cc b/passes/opt/opt_rmunused.cc index 9b276644..4807a97b 100644 --- a/passes/opt/opt_rmunused.cc +++ b/passes/opt/opt_rmunused.cc @@ -27,6 +27,8 @@ #include #include +using RTLIL::id2cstr; + static CellTypes ct; static void rmunused_module_cells(RTLIL::Module *module) -- cgit v1.2.3