[patch] PR15242

Paolo Bonzini paolo.bonzini@lu.unisi.ch
Thu Jan 27 13:55:00 GMT 2005


> +  /* 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



More information about the Gcc-patches mailing list