2014-07-03 14:56 GMT+04:00 Jakub Jelinek <ja...@redhat.com>: > On Thu, Jul 03, 2014 at 02:49:10PM +0400, Ilya Enkovich wrote: >> 2014-07-02 20:21 GMT+04:00 Andi Kleen <a...@firstfloor.org>: >> > Ilya Enkovich <enkovich....@gmail.com> writes: >> > >> >> Silvermont processors have penalty for instructions having 4+ bytes of >> >> prefixes (including escape bytes in opcode). This situation happens >> >> when REX prefix is used in SSE4 instructions. This patch tries to >> >> avoid such situation by preferring xmm0-xmm7 usage over xmm8-xmm15 in >> >> those instructions. I achieved it by adding new tuning flag and new >> >> alternatives affected by tuning. >> > >> > Why make it a tuning flag? Shouldn't this help unconditionally for code >> > size everywhere? Or is there some drawback? >> >> There is already a higher priority for registers not requiring REX. >> My patch affects cases when compiler has to use xmm8-15 and it just >> tries to say LRA to assign them for non SSE4 instructions. I doubt it >> would have some use for other targets than Silvermont. > > When it is just a hint, shouldn't there be something like Ya,???x > or Ya,!x or similar in the SSE4 constraints? I mean, xmm{8-15} can be used, > just is costly. >
I made it Ya,?x. I do not know how many '?' would be reasonable here. One was enough to get gain on tests where I expected it. Ilya > Jakub