[PATCH] D38594: [InlineCost] Tracking Values through PHI Nodes

Easwaran Raman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 11 18:29:18 PST 2017


eraman accepted this revision.
eraman added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: lib/Analysis/InlineCost.cpp:1632
+          if (!DeadBlocks.count(S) &&
+              llvm::all_of(predecessors(S),
+                           [&](BasicBlock *P) { return IsEdgeDead(P, S); }))
----------------
You could move this above condition !DeadBlocks.count(S) && llvm::all_of(predecessors(S)...) to a lambda IsNewlyDead(BasicBlock *B) and then use that in line 1619 above (if (Succ == NextBB) || !IsNewlyDead(Succ)) continue; I prefer that but will leave it to you. 


Repository:
  rL LLVM

https://reviews.llvm.org/D38594





More information about the llvm-commits mailing list