On 2012/12/20 19:41, Edd Barrett wrote:
> What would proper testing of -O3 for gcc4 arches entail? Would this be
> building the whole ports tree -O3 and trying the packages.

While I think there are (a very few) cases where it makes sense to
test/enable higher O levels on an arch by arch basis doing this
for the whole tree would be insane.

> Is there a more systematic approach, like a test suite or benchmark
> of correctness?

Bugs notwithstanding, optimisers assume things about code and change
results of undefined behaviour and corner cases in ways people
don't expect. Test suites and benchmarks of the compiler/optimiser
aren't going to help predict what it will do with some unknown code.

If (and only if) a particular very performance-sensitive program
has regularly been built on other OS on a certain arch with a certain
optimisation level with a similar compiler I think we might consider
that. Otherwise stick with the OS default.

Reply via email to