Revert "rtl-optimization/109237 - speedup bb_is_just_return"
authorRichard Biener <rguenther@suse.de>
Tue, 28 Mar 2023 07:31:36 +0000 (09:31 +0200)
committerRichard Biener <rguenther@suse.de>
Tue, 28 Mar 2023 07:32:54 +0000 (09:32 +0200)
This reverts commit 776a5bb5894315ab144dc74222fc580fde8fdd87.

PR rtl-optimization/109311
* cfgcleanup.cc (bb_is_just_return): Revert previous change.

gcc/cfgcleanup.cc

index 4cd3387..194e0e5 100644 (file)
@@ -2608,7 +2608,7 @@ bb_is_just_return (basic_block bb, rtx_insn **ret, rtx_insn **use)
   if (bb == EXIT_BLOCK_PTR_FOR_FN (cfun))
     return false;
 
-  FOR_BB_INSNS_REVERSE (bb, insn)
+  FOR_BB_INSNS (bb, insn)
     if (NONDEBUG_INSN_P (insn))
       {
        rtx pat = PATTERN (insn);