[LLVMdev] Memset/memcpy: user control of loop-idiom recognizer

Eric Christopher echristo at gmail.com
Tue Dec 2 13:12:38 PST 2014


On Tue Dec 02 2014 at 12:12:01 PM Robert Lougher <rob.lougher at gmail.com>
wrote:

> On 2 December 2014 at 19:57, Joerg Sonnenberger <joerg at britannica.bec.de>
> wrote:
> > On Tue, Dec 02, 2014 at 07:23:01PM +0000, Robert Lougher wrote:
> >> In feedback from game studios a common issue is the replacement of
> >> loops with calls to memcpy/memset.  These loops are often
> >> hand-optimised, and highly-efficient and the developers strongly want
> >> a way to control the compiler (i.e. leave my loop alone).
> >
> > I doubt that. If anything, it means the lowering of the intrinsic is
> > bad, not that the transformation should not happen.
> >
> > Joerg
>
> Yes, that's why I talked about variable and constant trip-counts.  For
> constant loops there generally isn't a problem, as they can be lowered
> inline (if small).  Variable loops, however, get expanded into a
> library call.
>
>
So the biggest problem is that you don't want a call and would prefer to
have inline memcpy code everywhere or something else? If the memcpy isn't
being lowered efficiently I'm curious as to what isn't being lowered well.

-eric


> Rob.
>
> > _______________________________________________
> > LLVM Developers mailing list
> > LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20141202/ff47937f/attachment.html>


More information about the llvm-dev mailing list