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]

Re: [patch] PR15242


+  /* Aggressively duplicate basic blocks ending in computed gotos to the
+     tails of their predecessors, unless we are optimizing for size.  */
+  if (flag_expensive_optimizations && !optimize_size)
+    duplicate_computed_gotos ();

A couple of things:


1) Are you sure you want !optimize_size? 300% slowdowns are not something small, and such computed goto code can be found in embedded software using -Os.

2) Also, it does not seem particularly expensive given that it only affects a wide minority of functions (for others, it's just a single FOR_EACH_BB iteration).

Maybe

if (flag_expensive_optimizations || (optimize && !optimize_size))

(i.e. only do it with -Os -fexpensive-optimization, or with -O) would be better?

Paolo


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