llvm-project/llvm/lib/Transforms
Chandler Carruth dd2e275a47 [PM/Unswitch] Fix a bug in the domtree update logic for the new unswitch
pass.

The original logic only considered direct successors of the hoisted
domtree nodes, but that isn't really enough. If there are other basic
blocks that are completely within the subtree, their successors could
just as easily be impacted by the hoisting.

The more I think about it, the more I think the correct update here is
to hoist every block on the dominance frontier which has an idom in the
chain we hoist across. However, this is subtle enough that I'd
definitely appreciate some more eyes on it.

Sadly, if this is the correct algorithm, it requires computing a (highly
localized) dominance frontier. I've done this in the simplest (IE, least
code) way I could come up with, but that may be too naive. Suggestions
welcome here, dominance update algorithms are not an area I've studied
much, so I don't have strong opinions.

In good news, with this patch, turning on simple unswitch passes the
LLVM test suite for me with asserts enabled.

Differential Revision: https://reviews.llvm.org/D32740

llvm-svn: 303843
2017-05-25 06:33:36 +00:00
..
Coroutines [coroutines] CoroFrame.cpp conform to coding convention (s/repeat/Repeat) (NFC) 2017-05-25 01:07:10 +00:00
Hello Add auto-exporting of symbols from tools so that plugins work on Windows 2016-05-26 11:16:43 +00:00
IPO [PartialInlining] Add internal options to enable partial inlining in pass pipeline (off by default) 2017-05-22 16:41:57 +00:00
InstCombine [InstCombine] use m_APInt to allow icmp-mul-mul vector fold 2017-05-24 22:58:17 +00:00
Instrumentation Fix coverage check for full post-dominator basic blocks. 2017-05-25 01:41:46 +00:00
ObjCARC [IR] Abstract away ArgNo+1 attribute indexing as much as possible 2017-05-03 18:17:31 +00:00
Scalar [PM/Unswitch] Fix a bug in the domtree update logic for the new unswitch 2017-05-25 06:33:36 +00:00
Utils [ValueTracking] Convert most of the calls to computeKnownBits to use the version that returns the KnownBits object. 2017-05-24 16:53:07 +00:00
Vectorize [LV] Update type in cost model for scalarization 2017-05-24 15:26:15 +00:00
CMakeLists.txt [coroutines] Part 3 of N: Adding Boilerplate for Coroutine Passes 2016-07-28 21:04:31 +00:00
LLVMBuild.txt [coroutines] Part 3 of N: Adding Boilerplate for Coroutine Passes 2016-07-28 21:04:31 +00:00