This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Add -fopt-info-loop support for interchange.


Bootstrapped and tested on x86_64-unknown-linux-gnu, applied.

Richard.

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.

Index: gcc/gimple-loop-interchange.cc
===================================================================
--- gcc/gimple-loop-interchange.cc	(revision 255499)
+++ gcc/gimple-loop-interchange.cc	(working copy)
@@ -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<
 		     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;
 }
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]