[PATCH] D23846: [MemCpy] Check for alias in performMemCpyToMemSetOptzn, instead of the identity of two operands

Tim Shen via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 25 14:16:04 PDT 2016


timshen marked 2 inline comments as done.

================
Comment at: llvm/trunk/lib/Transforms/Scalar/MemCpyOptimizer.cpp:1111
@@ -1110,1 +1110,3 @@
                                                MemSetInst *MemSet) {
+  AliasAnalysis &AA = LookupAliasAnalysis();
+
----------------
echristo wrote:
> Can probably fold this into the conditional since this is the only place it's used.
If you are talking about:
  if (LookupAliasAnalysis().isMustAlias(...))

, then for consistency with other call sites, I like to keep it as is (I searched for "LookupAliasAnalysis()." and found nothing).

If you are talking about:
  if (auto &AA = LoopupAliasAnalysis(); AA.isMustAlias(...))

It's a C++17 feature and we are not quite there yet! :)


Repository:
  rL LLVM

https://reviews.llvm.org/D23846





More information about the llvm-commits mailing list