[PATCH] D100706: [LICM] Make capture check more precise

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 19 10:24:28 PDT 2021


reames added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/LICM.cpp:1957
 
+bool isNotCapturedBeforeOrInLoop(const Value *V, const Loop *L,
+                                 DominatorTree *DT) {
----------------
nikic wrote:
> reames wrote:
> > I'd suggest inlining this helper into it's sole caller and simply updating the existing block comment.  (Optional.)
> There's two callers though :) One in isKnownNonEscaping, and the other in promoteLoopAccessesToScalars.
Oops, yep.  

Though why I wrote the second caller that way as opposed to calling the same helper is not immediately obvious.  Cleanup opportunity?

p.s. LGTM still stands.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100706/new/

https://reviews.llvm.org/D100706



More information about the llvm-commits mailing list