[PATCH] D65137: [GVN] Preserve loop related analysis/canonical forms.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 23 05:34:42 PDT 2019


fhahn added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/GVN.cpp:2478
+      if (!DeadBlocks.count(P))
+        continue;
       for (BasicBlock::iterator II = B->begin(); isa<PHINode>(II); ++II) {
----------------
jdoerfert wrote:
> These changes, incl. the `isCriticalEdge` modifications above, seem unrelated to the loop info issue, are they?
They do, but I should have made that clear. SplitCiriticalEdge will insert additional blocks to preserve LoopSimplify form, if LI is passed. Such a block might be inserted between B and one of its predecessors, which would cause GetNumSuccessor to assert. It is safer to just do it in 2 steps.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D65137





More information about the llvm-commits mailing list