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:
Cary R
2008-08-28 17:38:02 -07:00
committed by Stephen Williams
parent b455f3af5d
commit 150d51c19b
+1
View File
@@ -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;