[PATCH] D45584: [DSE] Teach the pass about partial overwrite of atomic memory intrinsics

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 2 19:09:02 PDT 2018


mkazantsev added reviewers: spatel, filcab, sanjoy.
mkazantsev added a comment.

I don't see any problems with the code (other than the nit I've pointed out), but I do not know this logic well enough to make the final judgement. Adding some people who contributed to DSE recently. Can you guys take a look?



================
Comment at: lib/Transforms/Scalar/DeadStoreElimination.cpp:917
+    const uint32_t ElementSize = AMI->getElementSizeInBytes();
+    // Note: ElementSize must be a power of 2
+    if (NewLength & (ElementSize - 1))
----------------
There are already existing functions for this, like `isPowerOf2_32`, can you please use one of them?


Repository:
  rL LLVM

https://reviews.llvm.org/D45584





More information about the llvm-commits mailing list