[PATCH] D18906: [DeadStoreElimination] Shorten beginning of memset overwritten by later stores

Jun Bum Lim via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 19 14:41:12 PDT 2016


junbuml added inline comments.

================
Comment at: lib/Transforms/Scalar/DeadStoreElimination.cpp:656
@@ +655,3 @@
+                    ? InstWriteOffset - DepWriteOffset
+                    : DepLoc.Size - (InstWriteOffset - DepWriteOffset);
+
----------------
mgrang wrote:
> Parentheses not really needed:
> 
> DepLoc.Size - (InstWriteOffset - DepWriteOffset) equals DepLoc.Size - InstWriteOffset - DepWriteOffset
DepLoc.Size - (InstWriteOffset - DepWriteOffset) is same as DepLoc.Size - InstWriteOffset + DepWriteOffset, but I think DepLoc.Size - (InstWriteOffset - DepWriteOffset)  is more readable. 


http://reviews.llvm.org/D18906





More information about the llvm-commits mailing list