This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH, PR38785] Throttle PRE at -O3
Quoting Richard Guenther <firstname.lastname@example.org>:
the function implementation is odd. cost is always 1 when used, and
both memory loads and calls are always cheap, but for example casts are not?
return EDGE_COUNT (block->preds) * cost >= inserts_needed;
always true? Or is inserts_needed not what it suggests?
The cost calculation and use is not an exact model of anything, but only
a rough approximation, and thus, like any heuristic, should be considered
subject to potential change when it can be shown that a change is beneficial
The idea was to write the code that changes to the cost calculation and use
could be applied with ease.
OTOH such changes shouldn't be adopted just because it looks like they'll
make a more realistic mode, there should be some evidence that they make
the compiler better in general.