mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-14 11:09:41 +02:00
* improve is_loop_invariant for load nodes
git-svn-id: trunk@44252 -
This commit is contained in:
parent
507fc9c1ff
commit
ac974c9ab7
@ -262,9 +262,10 @@ unit optloop;
|
|||||||
begin
|
begin
|
||||||
if (pi_dfaavailable in current_procinfo.flags) and
|
if (pi_dfaavailable in current_procinfo.flags) and
|
||||||
assigned(loop.optinfo) and
|
assigned(loop.optinfo) and
|
||||||
assigned(expr.optinfo) then
|
assigned(expr.optinfo) and
|
||||||
|
not(expr.isequal(tfornode(loop).left)) then
|
||||||
{ no aliasing? }
|
{ no aliasing? }
|
||||||
result:=not(tabstractvarsym(tloadnode(expr).symtableentry).addr_taken) and
|
result:=(([nf_write,nf_modify]*expr.flags)=[]) and not(tabstractvarsym(tloadnode(expr).symtableentry).addr_taken) and
|
||||||
{ no definition in the loop? }
|
{ no definition in the loop? }
|
||||||
not(DFASetIn(tfornode(loop).t2.optinfo^.defsum,expr.optinfo^.index));
|
not(DFASetIn(tfornode(loop).t2.optinfo^.defsum,expr.optinfo^.index));
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user