Fix (at least) quadratic worst-case complexity in DominanceFrontier::splitBlock:
authorDan Gohman <gohman@apple.com>
Mon, 26 Jul 2010 17:55:15 +0000 (17:55 +0000)
committerDan Gohman <gohman@apple.com>
Mon, 26 Jul 2010 17:55:15 +0000 (17:55 +0000)
commitb08ba8824e0e8bf1d4a68594c5efb65bf640ecc1
tree5a1b9999456fe75476c0e5364ca9f28f31d51b86
parentecfa079206912a1ae4069881cf63edf6be7fa117
Fix (at least) quadratic worst-case complexity in DominanceFrontier::splitBlock:
don't visit all blocks in the function, and don't iterate over the split blocks'
predecessor lists for each block visited.

Also, remove the special-case test for the entry block. Splitting the entry
block isn't common enough to make this worthwhile.

This fixes a major compile-time bottleneck which is exposed now that
LoopSimplify isn't being redundantly run both before and after
DominanceFrontier.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109408 91177308-0d34-0410-b5e6-96231b3b80d8
lib/VMCore/Dominators.cpp