On Jul 12, 2021, Christoph Müllner <cmuell...@gcc.gnu.org> wrote:

> * Why does the generic by-pieces infrastructure have a higher priority
> than the target-specific expansion via INSNs like setmem?

by-pieces was not affected by the recent change, and IMHO it generally
makes sense for it to have priority over setmem.  It generates only
straigh-line code for constant-sized blocks.  Even if you can beat that
with some machine-specific logic, you'll probably end up generating
equivalent code at least in some cases, and then, you probably want to
carefully tune the settings that select one or the other, or disable
by-pieces altogether.


by-multiple-pieces, OTOH, is likely to be beaten by machine-specific
looping constructs, if any are available, so setmem takes precedence.

My testing involved bringing it ahead of the insns, to exercise the code
more thoroughly even on x86*, but the submitted patch only used
by-multiple-pieces as a fallback.

> * And if there are no particular reasons, would it be acceptable to
> change the order?

I suppose moving insns ahead of by-pieces might break careful tuning of
multiple platforms, so I'd rather we did not make that change.

-- 
Alexandre Oliva, happy hacker                https://FSFLA.org/blogs/lxo/
   Free Software Activist                       GNU Toolchain Engineer
Disinformation flourishes because many people care deeply about injustice
but very few check the facts.  Ask me about <https://stallmansupport.org>

Reply via email to