Skip to content

Commit

Permalink
No need for looping splitfanout
Browse files Browse the repository at this point in the history
  • Loading branch information
akashlevy committed Oct 25, 2024
1 parent 038c562 commit b65ddf9
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions passes/cmds/splitfanout.cc
Original file line number Diff line number Diff line change
Expand Up @@ -207,17 +207,11 @@ struct SplitfanoutPass : public Pass {
int count_split_pre = 0;
int count_split_post = 0;

while (1) {
SplitfanoutWorker worker(module);
bool did_something = false;
for (auto cell : worker.toposort.sorted) {
int n = worker.split(module->cell(cell));
did_something |= (n != 0);
count_split_pre += (n != 0);
count_split_post += n;
}
if (!did_something)
break;
SplitfanoutWorker worker(module);
for (auto cell : worker.toposort.sorted) {
int n = worker.split(module->cell(cell));
count_split_pre += (n != 0);
count_split_post += n;
}

if (count_split_pre)
Expand Down

0 comments on commit b65ddf9

Please sign in to comment.