[PATCH] D35142: WIP! [CFG] Create a new removeUnreachable utility that updates the dom in place

Davide Italiano via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 9 06:14:32 PDT 2017


davide created this revision.
Herald added a subscriber: mehdi_amini.

This implements the algorithm suggested in https://reviews.llvm.org/D35028#800177 with a slight variation/implementation detail. We could have BBs which don't have corresponding nodes in the dominator, so we need to handle that case as well.  We also need an additional worklist for the dead block to avoid iterator invalidation issues (or at least, this was the easiest way I could think how to solve this problem).
This is WIP for two reasons:

1. I want the utility to have a better name for the utility [but I need to think about it, suggestions welcome]
2. I want to test it a little more. It passes the testsuite & bootstrap, but I'll try on something else I have available internally.


https://reviews.llvm.org/D35142

Files:
  include/llvm/Transforms/Utils/Local.h
  lib/Transforms/IPO/GlobalOpt.cpp
  lib/Transforms/Utils/Local.cpp
  test/Other/new-pm-lto-defaults.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35142.105684.patch
Type: text/x-patch
Size: 4003 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170709/fd59ccf7/attachment.bin>


More information about the llvm-commits mailing list