[PATCH] Re: Rewrite i386 string operation expansion

Uros Bizjak ubizjak@gmail.com
Thu Nov 30 09:06:00 GMT 2006


On 11/30/06, Jan Hubicka <jh@suse.cz> wrote:

> > >> > Also crashes for -march=pentium, -march=k6 and -march=nocona.
> > >>
> > >> Attached patch fixes this failure. Bootstrapped on i686-pc-linux-gnu.

> > If there is a better alternative, we still use it.
>
> Actually I would probably go for rep_prefix_4_byte/rep_prefix_8_byte
> when not optimizing for size and for rep_prefix_1_byte otherwise.  The
> full sized REP instruction is usually significantly faster in most
> cases and it is what kernel folks do (and those are about the main users of
> full inlining here).

Jan,

my proposed patch was more or less a band-aid for povray compilation
failure (-march=pentium4 -minline-all-stringops). However, I've
noticed that this proposed "solution" actually introduced a bit
(~1.4%) longer execution times on my povray test, perhaps due to the
reason you outlined above.

There is a fixup code for TARGET_INLINE_ALL_STRINGOPS below, but it is
never reached due to the assert that triggers in pentium4 case. I
guess that the correct solution is more complex than the one I
proposed.

Uros.



More information about the Gcc-patches mailing list