mirror of
https://github.com/YosysHQ/yosys
synced 2025-08-11 21:50:54 +00:00
ast: remove null_check as dead code
This commit is contained in:
parent
1a4dd18c5f
commit
90e3579820
2 changed files with 0 additions and 13 deletions
|
@ -260,7 +260,6 @@ namespace AST
|
||||||
// simplify() creates a simpler AST by unrolling for-loops, expanding generate blocks, etc.
|
// simplify() creates a simpler AST by unrolling for-loops, expanding generate blocks, etc.
|
||||||
// it also sets the id2ast pointers so that identifier lookups are fast in genRTLIL()
|
// it also sets the id2ast pointers so that identifier lookups are fast in genRTLIL()
|
||||||
bool simplify(bool const_fold, int stage, int width_hint, bool sign_hint);
|
bool simplify(bool const_fold, int stage, int width_hint, bool sign_hint);
|
||||||
void null_check();
|
|
||||||
void replace_result_wire_name_in_function(const std::string &from, const std::string &to);
|
void replace_result_wire_name_in_function(const std::string &from, const std::string &to);
|
||||||
std::unique_ptr<AstNode> readmem(bool is_readmemh, std::string mem_filename, AstNode *memory, int start_addr, int finish_addr, bool unconditional_init);
|
std::unique_ptr<AstNode> readmem(bool is_readmemh, std::string mem_filename, AstNode *memory, int start_addr, int finish_addr, bool unconditional_init);
|
||||||
void expand_genblock(const std::string &prefix);
|
void expand_genblock(const std::string &prefix);
|
||||||
|
|
|
@ -888,16 +888,6 @@ static void check_auto_nosync(AstNode *node)
|
||||||
check_auto_nosync(child.get());
|
check_auto_nosync(child.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
void AstNode::null_check()
|
|
||||||
{
|
|
||||||
for (auto& child : children) {
|
|
||||||
// if (!child)
|
|
||||||
// VALGRIND_PRINTF_BACKTRACE("null child");
|
|
||||||
log_assert((bool) child);
|
|
||||||
child->null_check();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// convert the AST into a simpler AST that has all parameters substituted by their
|
// convert the AST into a simpler AST that has all parameters substituted by their
|
||||||
// values, unrolled for-loops, expanded generate blocks, etc. when this function
|
// values, unrolled for-loops, expanded generate blocks, etc. when this function
|
||||||
// is done with an AST it can be converted into RTLIL using genRTLIL().
|
// is done with an AST it can be converted into RTLIL using genRTLIL().
|
||||||
|
@ -906,7 +896,6 @@ void AstNode::null_check()
|
||||||
// nodes that link to a different node using names and lexical scoping.
|
// nodes that link to a different node using names and lexical scoping.
|
||||||
bool AstNode::simplify(bool const_fold, int stage, int width_hint, bool sign_hint)
|
bool AstNode::simplify(bool const_fold, int stage, int width_hint, bool sign_hint)
|
||||||
{
|
{
|
||||||
// null_check();
|
|
||||||
static int recursion_counter = 0;
|
static int recursion_counter = 0;
|
||||||
static bool deep_recursion_warning = false;
|
static bool deep_recursion_warning = false;
|
||||||
|
|
||||||
|
@ -4434,7 +4423,6 @@ apply_newNode:
|
||||||
// dumpAst(stderr, "- ");
|
// dumpAst(stderr, "- ");
|
||||||
// newNode->dumpAst(stderr, "+ ");
|
// newNode->dumpAst(stderr, "+ ");
|
||||||
log_assert(newNode != nullptr);
|
log_assert(newNode != nullptr);
|
||||||
// newNode->null_check();
|
|
||||||
newNode->location.begin.filename = location.begin.filename;
|
newNode->location.begin.filename = location.begin.filename;
|
||||||
newNode->location = location;
|
newNode->location = location;
|
||||||
newNode->cloneInto(*this);
|
newNode->cloneInto(*this);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue