mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-08-22 05:47:31 +02:00
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:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user