[PATCH] D50489: [LICM] hoist fences out of loops w/o memory operations

Serguei Katkov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 8 21:57:32 PDT 2018


skatkov accepted this revision.
skatkov added inline comments.
This revision is now accepted and ready to land.


================
Comment at: include/llvm/Analysis/AliasSetTracker.h:228
+  /// If this alias set is known to contain a single instruction and *only* a
+  /// single unique instruction, return it.  
+  Instruction* getUniqueInstruction() {
----------------
Please document that method may return nullptr if it cannot determine the unique instruction by any reason.


================
Comment at: lib/Transforms/Scalar/LICM.cpp:696
+      return false;
+    return Begin->getUniqueInstruction() == FI;
   }
----------------
Don't you want to assert that if Begin->getUniqueInstruction() != then it should be FI?


Repository:
  rL LLVM

https://reviews.llvm.org/D50489





More information about the llvm-commits mailing list