gimple-loop-interchange.cc (tree_loop_interchange::interchange): Provide -fopt-info...
authorRichard Biener <rguenther@suse.de>
Fri, 8 Dec 2017 11:24:36 +0000 (11:24 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 8 Dec 2017 11:24:36 +0000 (11:24 +0000)
2017-12-08  Richard Biener  <rguenther@suse.de>

* gimple-loop-interchange.cc (tree_loop_interchange::interchange):
Provide -fopt-info-loop feedback when we interchange in a nest.

From-SVN: r255505

gcc/ChangeLog
gcc/gimple-loop-interchange.cc

index d911f6f90603b8c6bae836653181f8ef7cba7e65..e8aa3a13925bd383d2cf17329b46b7d0bc72b6b7 100644 (file)
@@ -1,3 +1,8 @@
+2017-12-08  Richard Biener  <rguenther@suse.de>
+
+       * gimple-loop-interchange.cc (tree_loop_interchange::interchange):
+       Provide -fopt-info-loop feedback when we interchange in a nest.
+
 2017-06-08  Richard Earnshaw  <rearnsha@arm.com>
 
        * config/arm/driver-arm.c (arm_cpu_table): Use fp-capable product names
index 6554a42e1fb2c619da98c37a624471adcb62e68a..3f7c54f597175e17ac87693a72b9dfdd625d1d08 100644 (file)
@@ -1550,6 +1550,7 @@ bool
 tree_loop_interchange::interchange (vec<data_reference_p> datarefs,
                                    vec<ddr_p> ddrs)
 {
+  location_t loc = find_loop_location (m_loop_nest[0]);
   bool changed_p = false;
   /* In each iteration we try to interchange I-th loop with (I+1)-th loop.
      The overall effect is to push inner loop to outermost level in whole
@@ -1597,8 +1598,12 @@ tree_loop_interchange::interchange (vec<data_reference_p> datarefs,
                     oloop.m_loop->num, iloop.m_loop->num);
        }
     }
-
   simple_dce_from_worklist (m_dce_seeds);
+
+  if (changed_p)
+    dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, loc,
+                    "loops interchanged in loop nest\n");
+
   return changed_p;
 }