[PATCH] [PATCH][SROA]Also slice the STORE when slicing a LOAD in AllocaSliceRewriter

Chandler Carruth chandlerc at gmail.com
Mon Aug 25 18:34:56 PDT 2014


On Mon, Aug 25, 2014 at 6:33 PM, Chandler Carruth <chandlerc at gmail.com>
wrote:

> In particular, why did the load need to be sliced up but the store didn't?
> That doesn't really make sense.


Oh, I see, you have a store into a non-alloca region from a value loaded
from the alloca.

I think preserving the wide store is correct here as it represents strictly
more freedom in the optimizer. We should do store narrowing to remove bit
math in the backend (or late in the optimizer).

To see why we would want to use the wider store: consider when we actually
can eventually fold the loads together. Once we split up a store, we can in
many cases never fuse them back together. =/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140825/e4810bc8/attachment.html>


More information about the llvm-commits mailing list