(rest_of_compilation): jump_optimize can change max_reg_num so rerun reg_scan
authorDoug Evans <dje@gnu.org>
Sat, 8 Jan 1994 19:56:03 +0000 (19:56 +0000)
committerDoug Evans <dje@gnu.org>
Sat, 8 Jan 1994 19:56:03 +0000 (19:56 +0000)
before calling cse_main.

From-SVN: r6360

gcc/toplev.c

index e98e548a757edf378aee61a323b4abbd401d20db..569e0699a733f6e556837726c9acdac8e560a61f 100644 (file)
@@ -2561,10 +2561,13 @@ rest_of_compilation (decl)
     {
       /* Running another jump optimization pass before the second
         cse pass sometimes simplifies the RTL enough to allow
-        the second CSE pass to do a better job.  */
-      TIMEVAR (cse2_time, reg_scan (insns, max_reg_num (), 0));
+        the second CSE pass to do a better job.  Jump_optimize can change
+        max_reg_num so we must rerun reg_scan afterwards.
+        ??? Rework to not call reg_scan so often.  */
+      TIMEVAR (jump_time, reg_scan (insns, max_reg_num (), 0));
       TIMEVAR (jump_time, jump_optimize (insns, 0, 0, 1));
 
+      TIMEVAR (cse2_time, reg_scan (insns, max_reg_num (), 0));
       TIMEVAR (cse2_time, tem = cse_main (insns, max_reg_num (),
                                          1, cse2_dump_file));
       if (tem)