[Bug rtl-optimization/69609] block reordering consumes an inordinate amount of time, REE consumes much memory

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Feb 10 12:57:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69609

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
Maybe sth as simple as

Index: gcc/bb-reorder.c
===================================================================
--- gcc/bb-reorder.c    (revision 233262)
+++ gcc/bb-reorder.c    (working copy)
@@ -889,6 +889,7 @@ bb_to_key (basic_block bb)

   /* Prefer blocks whose predecessor is an end of some trace
      or whose predecessor edge is EDGE_DFS_BACK.  */
+  if (EDGE_COUNT (bb->preds) <= 8)
   FOR_EACH_EDGE (e, ei, bb->preds)
     {
       if ((e->src != ENTRY_BLOCK_PTR_FOR_FN (cfun)

or precomputing whether a BB has abnormal preds and disabling the trace in
that case (or somehow sorting the edge vectors so that abnormal edges
come last so we can stop at the first abnormal edge).


More information about the Gcc-bugs mailing list