Optimize block delay type check
When looking for a delay_type() in a block stop when we have a DEFINITE_DELAY. Doing this could reduce the number of statements that need to be checked.
This commit is contained in:
parent
b455f3af5d
commit
150d51c19b
|
|
@ -2575,6 +2575,7 @@ DelayType NetBlock::delay_type() const
|
||||||
for (const NetProc*cur = proc_first(); cur; cur = proc_next(cur)) {
|
for (const NetProc*cur = proc_first(); cur; cur = proc_next(cur)) {
|
||||||
DelayType dt = cur->delay_type();
|
DelayType dt = cur->delay_type();
|
||||||
if (dt > result) result = dt;
|
if (dt > result) result = dt;
|
||||||
|
if (dt == DEFINITE_DELAY) break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue