On 09/24/2015 12:06 AM, Segher Boessenkool wrote:
The current basic block reordering always uses the "software trace cache"
algorithm. That has a few problems:
1) It increases code size substantially; this makes it not suitable for
-O1 or -Os, and not at all for some architectures;
2) but it is enabled for -Os and all targets;
3) and -O1 gets nothing, resulting in pretty jumpy code.
A general question first, I see code in bb-reorder.c (in copy_bb_p) that
limits the amount of code growth if not optimizing for speed. Is that
not working as expected or not sufficient?
Your code looks like a nice clean algorithm so I have no objections to
it (detailed comments to follow), but I want to make sure it is
necessary to add it.
Bernd