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]

Clenaup tree-ssa-sink after profile revamp


Hi,
there is no need to compute frequencies here.

Bootstrapped/regtested x86-64-linux, comitted.

Honza
	* tree-ssa-sink.c (select_best_block): Do not use frequencies.
Index: tree-ssa-sink.c
===================================================================
--- tree-ssa-sink.c	(revision 254695)
+++ tree-ssa-sink.c	(working copy)
@@ -226,8 +226,10 @@ select_best_block (basic_block early_bb,
   /* If BEST_BB is at the same nesting level, then require it to have
      significantly lower execution frequency to avoid gratutious movement.  */
   if (bb_loop_depth (best_bb) == bb_loop_depth (early_bb)
-      && best_bb->count.to_frequency (cfun)
-	 < (early_bb->count.to_frequency (cfun) * threshold / 100.0))
+      /* If result of comparsion is unknown, preffer EARLY_BB.
+	 Thus use !(...>=..) rather than (...<...)  */
+      && !(best_bb->count.apply_scale (100, 1)
+	   > (early_bb->count.apply_scale (threshold, 1))))
     return best_bb;
 
   /* No better block found, so return EARLY_BB, which happens to be the


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