mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-12 04:03:45 +00:00
sigspec: swap disposable for benchmark
This commit is contained in:
parent
49f547782c
commit
5cf6223bf3
|
@ -4034,12 +4034,14 @@ void RTLIL::SigSpec::unpack() const
|
|||
cover("kernel.rtlil.sigspec.convert.unpack");
|
||||
log_assert(that->bits_.empty());
|
||||
|
||||
std::vector<SigChunk> disposable;
|
||||
|
||||
that->bits_.reserve(that->width_);
|
||||
for (auto &c : that->chunks_)
|
||||
for (int i = 0; i < c.width; i++)
|
||||
that->bits_.emplace_back(c, i);
|
||||
|
||||
that->chunks_.clear();
|
||||
that->chunks_.swap(disposable);
|
||||
that->hash_ = 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue