aboutsummaryrefslogtreecommitdiffstats
path: root/frontends/ast/simplify.cc
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2019-08-23 10:00:50 -0700
committerEddie Hung <eddie@fpgeh.com>2019-08-23 10:00:50 -0700
commit6872805a3eb738a0a5921b232022abfd507cebb8 (patch)
treeb871344e8f96cd30c5a6bc3f275476e30f792de0 /frontends/ast/simplify.cc
parent6b51c154c6812f58676402ebbbdbb18d053ca4be (diff)
parentbb2d5bc4f85ac95104fbd2591ad92ebf0c22e11d (diff)
downloadyosys-6872805a3eb738a0a5921b232022abfd507cebb8.tar.gz
yosys-6872805a3eb738a0a5921b232022abfd507cebb8.tar.bz2
yosys-6872805a3eb738a0a5921b232022abfd507cebb8.zip
Merge remote-tracking branch 'origin/master' into mwk/xilinx_bufgmap
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)) { }
}