[llvm-commits] [llvm] r151620 - in /llvm/trunk: lib/Transforms/Scalar/DeadStoreElimination.cpp test/Transforms/DeadStoreElimination/OverwriteStoreStart.ll

Peter Cooper peter_cooper at apple.com
Tue Feb 28 10:00:23 PST 2012


On Feb 28, 2012, at 8:41 AM, Chris Lattner <clattner at apple.com> wrote:

> 
> On Feb 27, 2012, at 8:43 PM, Chandler Carruth wrote:
> 
>> On Mon, Feb 27, 2012 at 8:27 PM, Pete Cooper <peter_cooper at apple.com> wrote:
>> DSE: Shorten memset when a later store overwrites the start of it
>> 
>> Not 100% sure I understand the comments, but this won't shorten the memset if its address has favorable alignment constraints, or this would make a vector store become a scalar store? It would be good to have some test cases to clearly demonstrate where this should and shouldn't fire there... It might be that I've misread them, but I only see fairly limited testing of the negative cases here. (Perhaps just comments on what the test cases are actually checking would help...)
> 
> FWIW, it's important that we don't sacrifice alignment to save a few bytes stored.  When we get something like this:
> http://nondot.org/sabre/LLVMNotes/BetterStructureCopyOptimization.txt
Yeah, i agree.  In my case i'm actually not sacrificing alignment, but i admit both the comments and the checks in the code (and the tests!) need some work.  As Chandler said, i need far more tests, especially around vectors.

Pete
> 
> it will be straight-forward to model this properly without breaking alignment (by saying that the first few bytes are undefined).
> 
> -Chris
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120228/08572e8d/attachment.html>


More information about the llvm-commits mailing list