mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-06 06:03:23 +00:00
Merge pull request #1828 from YosysHQ/eddie/celltypes_speedup
kernel: share a single CellTypes within a pass
This commit is contained in:
commit
c90324662c
4 changed files with 50 additions and 31 deletions
|
@ -31,9 +31,8 @@ PRIVATE_NAMESPACE_BEGIN
|
|||
|
||||
bool did_something;
|
||||
|
||||
void replace_undriven(RTLIL::Design *design, RTLIL::Module *module)
|
||||
void replace_undriven(RTLIL::Module *module, const CellTypes &ct)
|
||||
{
|
||||
CellTypes ct(design);
|
||||
SigMap sigmap(module);
|
||||
SigPool driven_signals;
|
||||
SigPool used_signals;
|
||||
|
@ -1803,13 +1802,14 @@ struct OptExprPass : public Pass {
|
|||
}
|
||||
extra_args(args, argidx, design);
|
||||
|
||||
CellTypes ct(design);
|
||||
for (auto module : design->selected_modules())
|
||||
{
|
||||
log("Optimizing module %s.\n", log_id(module));
|
||||
|
||||
if (undriven) {
|
||||
did_something = false;
|
||||
replace_undriven(design, module);
|
||||
replace_undriven(module, ct);
|
||||
if (did_something)
|
||||
design->scratchpad_set_bool("opt.did_something", true);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue