]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/hw-doloop.c
Correct a function pre/postcondition [PR102403].
[thirdparty/gcc.git] / gcc / hw-doloop.c
index ff2cb7bac45ad55fdd0735b5469ef9e03c2d7afd..f279d46cc31850acde4ae5ce8a03947969b859fa 100644 (file)
@@ -1,6 +1,6 @@
 /* Code to analyze doloop loops in order for targets to perform late
    optimizations converting doloops to other forms of hardware loops.
-   Copyright (C) 2011-2015 Free Software Foundation, Inc.
+   Copyright (C) 2011-2021 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -21,50 +21,18 @@ along with GCC; see the file COPYING3.  If not see
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
-#include "tm.h"
+#include "backend.h"
 #include "rtl.h"
-#include "flags.h"
-#include "symtab.h"
-#include "hashtab.h"
-#include "hash-set.h"
-#include "vec.h"
-#include "machmode.h"
-#include "hard-reg-set.h"
-#include "input.h"
-#include "function.h"
-#include "statistics.h"
-#include "double-int.h"
-#include "real.h"
-#include "fixed-value.h"
-#include "alias.h"
-#include "wide-int.h"
-#include "inchash.h"
-#include "tree.h"
+#include "df.h"
 #include "insn-config.h"
-#include "expmed.h"
-#include "dojump.h"
-#include "explow.h"
-#include "calls.h"
-#include "emit-rtl.h"
-#include "varasm.h"
-#include "stmt.h"
-#include "expr.h"
 #include "regs.h"
-#include "predict.h"
-#include "dominance.h"
-#include "cfg.h"
-#include "cfgrtl.h"
-#include "basic-block.h"
-#include "tm_p.h"
-#include "df.h"
-#include "cfgloop.h"
+#include "memmodel.h"
+#include "emit-rtl.h"
 #include "recog.h"
-#include "target.h"
+#include "cfgrtl.h"
 #include "hw-doloop.h"
 #include "dumpfile.h"
 
-#ifdef HAVE_doloop_end
-
 /* Dump information collected in LOOPS.  */
 static void
 dump_hwloops (hwloop_info loops)
@@ -173,7 +141,7 @@ scan_loop (hwloop_info loop)
            CLEAR_HARD_REG_BIT (set_this_insn, REGNO (loop->iter_reg));
          else if (reg_mentioned_p (loop->iter_reg, PATTERN (insn)))
            loop->iter_reg_used = true;
-         IOR_HARD_REG_SET (loop->regs_set_in_loop, set_this_insn);
+         loop->regs_set_in_loop |= set_this_insn;
        }
     }
 }
@@ -613,7 +581,7 @@ optimize_loop (hwloop_info loop, struct hw_doloop_hooks *hooks)
        inner_depth = inner->depth;
       /* The set of registers may be changed while optimizing the inner
         loop.  */
-      IOR_HARD_REG_SET (loop->regs_set_in_loop, inner->regs_set_in_loop);
+      loop->regs_set_in_loop |= inner->regs_set_in_loop;
     }
 
   loop->depth = inner_depth + 1;
@@ -666,7 +634,7 @@ reorg_loops (bool do_reorder, struct hw_doloop_hooks *hooks)
 
   /* We can't enter cfglayout mode anymore if basic block partitioning
      already happened.  */
-  if (do_reorder && !flag_reorder_blocks_and_partition)
+  if (do_reorder && !crtl->has_bb_partition)
     {
       reorder_loops (loops);
       free_loops (loops);
@@ -696,4 +664,3 @@ reorg_loops (bool do_reorder, struct hw_doloop_hooks *hooks)
   if (dump_file)
     print_rtl (dump_file, get_insns ());
 }
-#endif