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

--- Comment #9 from Segher Boessenkool <segher at gcc dot gnu.org> ---
(In reply to rguent...@suse.de from comment #8)
> > maybe_duplicate_computed_goto should never ever decide to know better than
> > its caller.  That way insanity lies.
> 
> "maybe_" suggests it's not all that clear,


 I understand the intent is
> more like duplicate_computed_goto_if_possible (as opposed to
> _if_profitable_and_possible).
> 
> But sure, limiting in the caller is sensible as well - it might be even
> applying an overall cost (rather than a per PRED duplication cost).
> 
> But as said the main issue is the successors are "artificial" - there's
> only a single real successor - it's just not known statically.  So finding
> a better representation for the CFG to solve the time/memory issue is
> better than not duplicating the gotos.

That is not how I understand the name, no (and I wrote this) :-)

As the function comment says:

/* Duplicate a block (that we already know ends in a computed jump) into its
   predecessors, where possible.  Return whether anything is changed.  */

"Where possible".  That makes sense, that is sane, and that is what it does.

Reply via email to