[PATCH] D48256: Fix bug to merge away entry block and update DT correctly.

Davide Italiano via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 17 12:15:03 PDT 2018


davide added a comment.

I admit I haven't looked at this code in a while, but I can't understand your fix. Can you please elaborate with an example?



================
Comment at: lib/Transforms/Utils/Local.cpp:718
+  // Entry block does not have IDom.
+  if (DT && !ReplaceEntryBB) {
     // For some irreducible CFG we end up having forward-unreachable blocks
----------------
I'm a little confused by this comment. Isn't always the case that the entry block has no idom by definition of dominator tree?


================
Comment at: unittests/Transforms/Utils/Local.cpp:221
+        br label %bb2.i
+      bb2.i:                                            ; preds = %bb4.i, %entry
+        br label %base2flt.exit204
----------------
The predecessors list here looks wrong?


Repository:
  rL LLVM

https://reviews.llvm.org/D48256





More information about the llvm-commits mailing list