Web lists-archives.com

Re: [MPlayer-dev-eng] [PATCH] Support compiling without CPU optimization




Reimar Döffinger wrote on Fri, 5 Jun 2015 20:46:44 +0200:

> Is gcc improving for =native likely? I don't really know anything about
> this issue.

I did not intend to give the impression that I'd knew about compilers or even
gcc internals. I was just observing that depending on -march/-mtune resp.
--with-arch/--with-cpu different options took effect. Options which might or
might not affect code efficiency or performance (or might even be
insignificant).

> I was also wondering about what you set with -mtune=generic being better,
> is that only with your special gcc?

It seems that -mtune=generic comes automatically by specifying --with-arch
but not --with-cpu when compiling gcc. On modern Intel CPUs it affects
avx256-split-unaligned-load/store (which may or may not give better
performance - depending on the sources). I just meant to express that options
even the kernel is being compiled with can't be totally wrong.

With -mtune=intel, for example, you'll get accumulate-outgoing-args which is
said to be faster on most modern CPUs (but increases code size, though).

> Because then maybe --extra-cflags="-march=generic -mtune=generic" would
> work?

There is no -march=generic.

So whatever good settings for -march/-mtune might be, I just wanted to not
let the configure script decide on it unconditionally, but respect a demand
the user may have given when compiling the compiler. It would have been
easier, though, to only add a simple patch to my private collection (as I did
now) than to prepare and suggest a more general approach.

BTW, one other thing. It may be OK for you if configure says "error" in case
of just not using -march/-mtune, because you know what it means and what the
reason is, but a user will be seriously worried seeing "error". IMHO it is
important to give reasonable and easy to understand feedback to the user from
the user's point of view, not from the developer's one. Even more so since
the explanatory message (CPU optimization disabled. CPU not recognized...)
would still have been displayed.

Just my two cents (but doesn't matter any more).

Ingo
_______________________________________________
MPlayer-dev-eng mailing list
MPlayer-dev-eng@xxxxxxxxxxxx
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng