[PATCH] D30890: Post-dom fix - connect virtual edges to last reverse-reachable BB

Tobias Grosser via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 13 06:40:54 PDT 2017


grosser created this revision.
Herald added a subscriber: david2050.

This change is an adapted version of Daniel's "Fix PR 24415 (at least), by
making our post-dominator tree behavior sane." patch, which ensures that
we correctly detect SESE regions that contain infinite loops.

To remain consistent we handle unreachable() basic blocks the same way as
infinite loops.

This is a proof-of-concept patch used in the discussion on how to properly
complete the post-dominator tree to include reverse unreachable nodes.


https://reviews.llvm.org/D30890

Files:
  include/llvm/ADT/GraphTraits.h
  include/llvm/Analysis/RegionInfoImpl.h
  include/llvm/IR/CFG.h
  include/llvm/Support/GenericDomTree.h
  include/llvm/Support/GenericDomTreeConstruction.h
  lib/Transforms/Scalar/ADCE.cpp
  test/Analysis/PostDominators/pr24415.ll
  test/Analysis/PostDominators/pr6047_a.ll
  test/Analysis/PostDominators/pr6047_b.ll
  test/Analysis/PostDominators/pr6047_c.ll
  test/Analysis/PostDominators/pr6047_d.ll
  test/Analysis/RegionInfo/infinite_loop.ll
  test/Analysis/RegionInfo/infinite_loop_2.ll
  test/Analysis/RegionInfo/infinite_loop_3.ll
  test/Analysis/RegionInfo/infinite_loop_4.ll
  test/Analysis/RegionInfo/infinite_loop_5_a.ll
  test/Analysis/RegionInfo/infinite_loop_5_b.ll
  test/Transforms/StructurizeCFG/branch-on-argument.ll
  test/Transforms/StructurizeCFG/no-branch-to-entry.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30890.91552.patch
Type: text/x-patch
Size: 22461 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170313/6547713b/attachment.bin>


More information about the llvm-commits mailing list