[PATCH] D23470: [memcpyopt] Memcpy-memcpy dependence isn't detected across basic blocks

Daniel Berlin via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 13 20:22:28 PDT 2016


dberlin added inline comments.

================
Comment at: include/llvm/Analysis/MemoryDependenceAnalysis.h:384
@@ -383,3 +383,3 @@
   /// QueryInst's parent basic block.
-  void getNonLocalPointerDependency(Instruction *QueryInst,
+  void getNonLocalPointerDependency(MemoryLocation &Loc, bool isLoad, Instruction *QueryInst,
                                     SmallVectorImpl<NonLocalDepResult> &Result);
----------------
I figure you are trying to make the two API's look the same, but the honest truth is: the other API sucks :)

There are a bunch of instructions that affect memory that don't have MemoryLocation's (calls are a good example).

I know you just are pushing the first two lines it does up, and that this means the function will crash on things like fences, etc, but we shouldn't make it worse :)

In any case, if you really want to do this, this should be shoved into a different patch, as it's completely unrelated to your change


https://reviews.llvm.org/D23470





More information about the llvm-commits mailing list