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] bb-reorder: Improve the simple algorithm for -Os (PR67864)


On Fri, Oct 09, 2015 at 11:29:16AM +0200, Richard Biener wrote:
> I think the patch makes sense but it also raises a question for me - how
> did we decide what edge gets EDGE_FALLTHRU when going out-of-cfglayout?

Good question.  I think it just tries to make "natural" control flow; I'll
investigate.

> And isn't _that_ mechanism then not part of basic-block reordering that
> needs to be tweaked for choosing the EDGE_FALLTHRU as better?

Yes.

This patch uses the existing fallthrough for conditional branches, which
seems to work best; but it still can significantly improve on unconditional
branches.  I'm sure there are better heuristics possible but I don't know
them (and actually *solving* the problem isn't even polynomial of course).


Segher


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