mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 13:28:05 +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
|
||||
if (pi_dfaavailable in current_procinfo.flags) and
|
||||
assigned(loop.optinfo) and
|
||||
assigned(expr.optinfo) then
|
||||
assigned(expr.optinfo) and
|
||||
not(expr.isequal(tfornode(loop).left)) then
|
||||
{ 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? }
|
||||
not(DFASetIn(tfornode(loop).t2.optinfo^.defsum,expr.optinfo^.index));
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user