[PATCH] D88893: [SROA] Only generate memcpy if the slices is large 'enough' (WIP).

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 6 07:56:47 PDT 2020


fhahn added a comment.

In D88893#2314402 <https://reviews.llvm.org/D88893#2314402>, @lebedev.ri wrote:

> This isn't really SROA specific is it?
> Instcombine also expands small (16 bytes, hardcoded) memcpy's
> I would think this should be done by some standalone pass, as a costmodel-driven optimization.

yeah we might as well do this independently, although we might be able to catch the most important cases at the 'source' as well. Deciding which memcpys needs to be target specific I think, in a way of cost-modeling, which this patch does, although very naively. Unfortunately it is going to be quite hard to estimate whether expanding memcpy will enable further optimizations.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88893/new/

https://reviews.llvm.org/D88893



More information about the llvm-commits mailing list