aboutsummaryrefslogtreecommitdiffstats
path: root/frontends/ast
diff options
context:
space:
mode:
authorUdi Finkelstein <github@udifink.com>2018-09-25 00:32:57 +0300
committerUdi Finkelstein <github@udifink.com>2018-09-25 00:32:57 +0300
commit80a07652f2eb5e13190f46dcc116207a0427dc65 (patch)
tree7474c92ca2c8d0118191d065ee4912ef7adebca7 /frontends/ast
parentc693f595c53e2e40840ff40b5b5ba06767582d23 (diff)
downloadyosys-80a07652f2eb5e13190f46dcc116207a0427dc65.tar.gz
yosys-80a07652f2eb5e13190f46dcc116207a0427dc65.tar.bz2
yosys-80a07652f2eb5e13190f46dcc116207a0427dc65.zip
Fixed issue #630 by fixing a minor typo in the previous commit
(as well as a non critical minor code optimization)
Diffstat (limited to 'frontends/ast')
-rw-r--r--frontends/ast/simplify.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/frontends/ast/simplify.cc b/frontends/ast/simplify.cc
index e741bd92a..e1c2cb26a 100644
--- a/frontends/ast/simplify.cc
+++ b/frontends/ast/simplify.cc
@@ -3028,8 +3028,8 @@ bool AstNode::mem2reg_as_needed_pass2(pool<AstNode*> &mem2reg_set, AstNode *mod,
AstNode *newNode = clone();
newNode->type = AST_ASSIGN_EQ;
+ newNode->children[0]->was_checked = true;
async_block->children[0]->children.push_back(newNode);
- async_block->children[0]->children.back()->children[0]->was_checked = true;
newNode = new AstNode(AST_NONE);
newNode->cloneInto(this);
@@ -3074,7 +3074,7 @@ bool AstNode::mem2reg_as_needed_pass2(pool<AstNode*> &mem2reg_set, AstNode *mod,
AstNode *assign_addr = new AstNode(AST_ASSIGN_EQ, new AstNode(AST_IDENTIFIER), children[0]->children[0]->children[0]->clone());
assign_addr->children[0]->str = id_addr;
- assign_addr->children[0]->str = was_checked;
+ assign_addr->children[0]->was_checked = true;
block->children.insert(block->children.begin()+assign_idx+1, assign_addr);
AstNode *case_node = new AstNode(AST_CASE, new AstNode(AST_IDENTIFIER));