mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-28 03:15:50 +00:00
Add Pass::on_register() and Pass::on_shutdown()
Signed-off-by: Clifford Wolf <clifford@clifford.at>
This commit is contained in:
parent
823a08e0d8
commit
cd92a974f4
3 changed files with 20 additions and 1 deletions
|
@ -114,20 +114,35 @@ void Pass::run_register()
|
|||
|
||||
void Pass::init_register()
|
||||
{
|
||||
vector<Pass*> added_passes;
|
||||
while (first_queued_pass) {
|
||||
added_passes.push_back(first_queued_pass);
|
||||
first_queued_pass->run_register();
|
||||
first_queued_pass = first_queued_pass->next_queued_pass;
|
||||
}
|
||||
for (auto added_pass : added_passes)
|
||||
added_pass->on_register();
|
||||
}
|
||||
|
||||
void Pass::done_register()
|
||||
{
|
||||
for (auto &it : pass_register)
|
||||
it.second->on_shutdown();
|
||||
|
||||
frontend_register.clear();
|
||||
pass_register.clear();
|
||||
backend_register.clear();
|
||||
log_assert(first_queued_pass == NULL);
|
||||
}
|
||||
|
||||
void Pass::on_register()
|
||||
{
|
||||
}
|
||||
|
||||
void Pass::on_shutdown()
|
||||
{
|
||||
}
|
||||
|
||||
Pass::~Pass()
|
||||
{
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue