mirror of
https://github.com/YosysHQ/yosys
synced 2025-05-11 01:35:49 +00:00
fixup! ast: add GC for dev debugging
This commit is contained in:
parent
d8cae1d904
commit
0d8ea6f8c3
2 changed files with 2 additions and 3 deletions
|
@ -467,7 +467,7 @@ namespace AST_INTERNAL
|
||||||
AST::AstNode *original_ast = nullptr);
|
AST::AstNode *original_ast = nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
#undef ASTNODE_GC
|
#define ASTNODE_GC
|
||||||
#ifdef ASTNODE_GC
|
#ifdef ASTNODE_GC
|
||||||
struct Tagger {
|
struct Tagger {
|
||||||
std::set<AST::AstNode*> nodes;
|
std::set<AST::AstNode*> nodes;
|
||||||
|
@ -524,7 +524,6 @@ struct Tagger {
|
||||||
while (!copy.empty()) {
|
while (!copy.empty()) {
|
||||||
AST::AstNode* p = *(copy.begin());
|
AST::AstNode* p = *(copy.begin());
|
||||||
copy.erase(p);
|
copy.erase(p);
|
||||||
fflush(stdout);
|
|
||||||
if (!tagged.count(p)) {
|
if (!tagged.count(p)) {
|
||||||
shadow_kill(p);
|
shadow_kill(p);
|
||||||
}
|
}
|
||||||
|
|
|
@ -536,7 +536,7 @@ struct VerilogFrontend : public Frontend {
|
||||||
if (AST::AstModule* am = dynamic_cast<AST::AstModule*>(m))
|
if (AST::AstModule* am = dynamic_cast<AST::AstModule*>(m))
|
||||||
Tagger::get().tag(am->ast);
|
Tagger::get().tag(am->ast);
|
||||||
|
|
||||||
Tagger::get().dump_untagged();
|
// Tagger::get().dump_untagged();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!flag_nopp)
|
if (!flag_nopp)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue