mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-14 22:59:29 +02:00
* optimize CheckAndWarn
git-svn-id: trunk@26164 -
This commit is contained in:
parent
35206c3d93
commit
6924cc0458
@ -812,10 +812,9 @@ unit optdfa;
|
||||
i : longint;
|
||||
touchesnode : Boolean;
|
||||
|
||||
procedure MaybeDoCheck(n : tnode);
|
||||
procedure MaybeDoCheck(n : tnode);inline;
|
||||
begin
|
||||
if not(Result) then
|
||||
Result:=Result or DoCheck(n);
|
||||
Result:=Result or DoCheck(n);
|
||||
end;
|
||||
|
||||
procedure MaybeSearchIn(n : tnode);
|
||||
@ -834,12 +833,17 @@ unit optdfa;
|
||||
exit;
|
||||
include(node.flags,nf_processing);
|
||||
|
||||
touchesnode:=DFASetIn(node.optinfo^.use,nodetosearch.optinfo^.index) or
|
||||
DFASetIn(node.optinfo^.def,nodetosearch.optinfo^.index);
|
||||
|
||||
if not(DFASetIn(node.optinfo^.life,nodetosearch.optinfo^.index)) then
|
||||
exit;
|
||||
|
||||
{ we do not need this info always, so try to safe some time here, CheckAndWarn
|
||||
takes a lot of time anyways }
|
||||
if not(node.nodetype in [statementn,blockn]) then
|
||||
touchesnode:=DFASetIn(node.optinfo^.use,nodetosearch.optinfo^.index) or
|
||||
DFASetIn(node.optinfo^.def,nodetosearch.optinfo^.index)
|
||||
else
|
||||
touchesnode:=false;
|
||||
|
||||
case node.nodetype of
|
||||
whilerepeatn:
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user