aboutsummaryrefslogtreecommitdiffstats
path: root/frontends/ast/simplify.cc
diff options
context:
space:
mode:
authorSergey <37293587+SergeyDegtyar@users.noreply.github.com>2019-08-29 21:07:34 +0300
committerGitHub <noreply@github.com>2019-08-29 21:07:34 +0300
commitd360693040dda29aba4ef2583e522c6ab88a4961 (patch)
tree3de073925c8e3a4a613303ea807aeef12949a3d7 /frontends/ast/simplify.cc
parentd588c6898fb7cfebe52a71a48d6fb21d1623e61b (diff)
parentb8a9f73089234ed699a4057b50fd739a90abea43 (diff)
downloadyosys-d360693040dda29aba4ef2583e522c6ab88a4961.tar.gz
yosys-d360693040dda29aba4ef2583e522c6ab88a4961.tar.bz2
yosys-d360693040dda29aba4ef2583e522c6ab88a4961.zip
Merge pull request #3 from YosysHQ/Sergey/tests_ice40
Merge my changes to tests_ice40 branch
Diffstat (limited to 'frontends/ast/simplify.cc')
-rw-r--r--frontends/ast/simplify.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/frontends/ast/simplify.cc b/frontends/ast/simplify.cc
index 54b9efaad..86dd80c65 100644
--- a/frontends/ast/simplify.cc
+++ b/frontends/ast/simplify.cc
@@ -150,6 +150,11 @@ bool AstNode::simplify(bool const_fold, bool at_zero, bool in_lvalue, int stage,
reg->str = stringf("%s[%d]", node->str.c_str(), i);
reg->is_reg = true;
reg->is_signed = node->is_signed;
+ for (auto &it : node->attributes)
+ if (it.first != ID(mem2reg))
+ reg->attributes.emplace(it.first, it.second->clone());
+ reg->filename = node->filename;
+ reg->linenum = node->linenum;
children.push_back(reg);
while (reg->simplify(true, false, false, 1, -1, false, false)) { }
}