tree-ssa-loop-prefetch.c (loop_prefetch_arrays): Ignore cold loops.
authorZdenek Dvorak <dvorakz@suse.cz>
Sun, 15 Apr 2007 03:36:25 +0000 (05:36 +0200)
committerZdenek Dvorak <rakdver@gcc.gnu.org>
Sun, 15 Apr 2007 03:36:25 +0000 (03:36 +0000)
* tree-ssa-loop-prefetch.c (loop_prefetch_arrays): Ignore
cold loops.

From-SVN: r123843

gcc/ChangeLog
gcc/tree-ssa-loop-prefetch.c

index 43eff0c..cc2aada 100644 (file)
@@ -1,3 +1,8 @@
+2007-04-11  Zdenek Dvorak  <dvorakz@suse.cz>
+
+       * tree-ssa-loop-prefetch.c (loop_prefetch_arrays): Ignore
+       cold loops.
+
 2007-04-14  Andrew Pinski  <andrew_pinski@playstation.sony.com>
 
        PR c/31520
index a0d70cc..35e8021 100644 (file)
@@ -947,6 +947,13 @@ loop_prefetch_arrays (struct loop *loop)
   struct tree_niter_desc desc;
   bool unrolled = false;
 
+  if (!maybe_hot_bb_p (loop->header))
+    {
+      if (dump_file && (dump_flags & TDF_DETAILS))
+       fprintf (dump_file, "  ignored (cold area)\n");
+      return false;
+    }
+
   /* Step 1: gather the memory references.  */
   refs = gather_memory_references (loop);