[PATCH] D19338: New code hoisting pass based on GVN (optimistic approach)
    Daniel Berlin via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon Jun  6 08:43:09 PDT 2016
    
    
  
dberlin added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/GVNHoist.cpp:278
@@ +277,3 @@
+  // Return true when there are users of A in one of the BBs of Paths.
+  bool hasMemoryUseOnPaths(MemoryAccess *A,
+                           SmallPtrSetImpl<const BasicBlock *> &Paths) {
----------------
I feel like this + gatherallblocks is really an up-safe/down-safe computation (depending on whether it's a load or store), and can be done much saner than you are doing it.
In particular, this seems a really complicated and expensive way to compute this property, compared to how most PRE papers do it.
http://reviews.llvm.org/D19338
    
    
More information about the llvm-commits
mailing list