OSDN Git Service

Reapply: [ADCE][Dominators] Teach ADCE to preserve dominators
authorJakub Kuderski <kubakuderski@gmail.com>
Thu, 17 Aug 2017 01:41:49 +0000 (01:41 +0000)
committerJakub Kuderski <kubakuderski@gmail.com>
Thu, 17 Aug 2017 01:41:49 +0000 (01:41 +0000)
commit85bef5a5c4c8a56a9b8ef9e815d88d03faee7876
tree0f72c75901fd89eb2252c116991e7f8be805930f
parent994272f0314bf9f902fb9bcc22e58bb08472cea5
Reapply: [ADCE][Dominators] Teach ADCE to preserve dominators

Summary:
This patch teaches ADCE to preserve both DominatorTrees and PostDominatorTrees.

I didn't notice any performance impact when bootstrapping clang with this patch.

The patch was originally committed in r311039 and reverted in r311049.
This revision fixes the problem with not adding a dependency on the
DominatorTreeWrapperPass for the LegacyPassManager.

Reviewers: dberlin, chandlerc, sanjoy, davide, grosser, brzycki

Reviewed By: davide

Subscribers: grandinj, zhendongsu, llvm-commits, david2050

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311057 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Support/GenericDomTreeConstruction.h
lib/Transforms/Scalar/ADCE.cpp
test/Transforms/ADCE/domtree-DoubleDeletion.ll [new file with mode: 0644]
test/Transforms/ADCE/unreachable.ll [new file with mode: 0644]