[PATCH] D66604: [GVN] AnalyzeLoadAvailability: Replace a load after lifetime.end with undef (PR20811)

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 1 09:05:41 PDT 2019


fhahn added a comment.

Thanks for the patch and sorry for the long response time



================
Comment at: llvm/lib/Transforms/Scalar/GVN.cpp:874
+
+  // Loading the allocation -> undef.
+  if (isa<AllocaInst>(DepInst) || isMallocLikeFn(DepInst, TLI) ||
----------------
 I suppose the reason for moving this was that we do not get a Def dependency for lifetime_end? 

I think we should keep the original checks at their original positions, we should  only get those for defs. The handling of lifetime_end can be moved in the block dealing with clobbers.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D66604





More information about the llvm-commits mailing list