Browse Source

* x86: "NotFirstIteration" is now configured for Pass 2 of the peephole optimizer

J. Gareth "Curious Kit" Moreton 1 month ago
parent
commit
e706df5cec
1 changed files with 4 additions and 0 deletions
  1. 4 0
      compiler/aoptobj.pas

+ 4 - 0
compiler/aoptobj.pas

@@ -2766,6 +2766,7 @@ Unit AoptObj;
         PassCount := 0;
 
         { Pass 2 is only executed multiple times under -O3 and above }
+        NotFirstIteration := False;
         repeat
           stoploop := True;
           p := BlockStart;
@@ -2787,6 +2788,9 @@ Unit AoptObj;
 
           Inc(PassCount);
 
+          if not stoploop then
+            NotFirstIteration := True;
+
         until stoploop or not (cs_opt_level3 in current_settings.optimizerswitches) or (PassCount >= MaxPasses_Pass2);
       end;