[fpc-devel] Debugging Loop Unroll Optimization

Florian Klämpfl florian at freepascal.org
Mon May 21 20:43:48 CEST 2018


Am 21.05.2018 um 19:27 schrieb Ondrej Pokorny:
> On 21.05.2018 18:23, Martok wrote:
>> Am 21.05.2018 um 17:44 schrieb Florian Klämpfl:
>>> I added raise, exit, goto and label as well.
>> Oh, label, right.
>>
>> I'd say #0033614 can be resolved as "fixed in 39083" and #0033753 as "no change
>> required" then.
> 
> Well there is still something left:
> 
> program LoopUnrollTest;
> procedure Test;
> var
>   I: Integer;
>   procedure Test2;
>   begin
>     Writeln(I);
>   end;
> begin
>   for I := 1 to 10 do
>     Test2;
> end;
> begin
>   Test;
> end.

What do you expect? That it just works? If yes, what about

program LoopUnrollTest;
procedure Test;
var
  I: Integer;
  procedure Test2;
  begin
    Writeln(I);
    I:=1;
  end;
begin
  for I := 1 to 10 do
    Test2;
end;
begin
  Test;
end.

?



More information about the fpc-devel mailing list