[PGOMemOPSize] Preserve the DominatorTree
authorChijun Sima <simachijun@gmail.com>
Mon, 9 Jul 2018 08:07:21 +0000 (08:07 +0000)
committerChijun Sima <simachijun@gmail.com>
Mon, 9 Jul 2018 08:07:21 +0000 (08:07 +0000)
commit9e1e0c7b2ac47dc1d09bbbbd4f5717020cb8b3d4
tree8df6486856550ef0cde30f635c89df0325315852
parent2dc3dac90ce1dae447e935d5070ea182f77de23e
[PGOMemOPSize] Preserve the DominatorTree

Summary:
PGOMemOPSize only modifies CFG in a couple of places; thus we can preserve the DominatorTree with little effort.
When optimizing SQLite with -O3, this patch can decrease 3.8% of the numbers of nodes traversed by DFS and 5.7% of the times DominatorTreeBase::recalculation is called.

Reviewers: kuhar, davide, dmgreen

Reviewed By: dmgreen

Subscribers: mzolotukhin, vsk, llvm-commits

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

llvm-svn: 336522
llvm/lib/Transforms/Instrumentation/PGOMemOPSizeOpt.cpp
llvm/test/Other/opt-O2-pipeline.ll
llvm/test/Other/opt-O3-pipeline.ll
llvm/test/Transforms/PGOProfile/memop_clone.ll
llvm/test/Transforms/PGOProfile/memop_size_opt.ll
llvm/test/Transforms/PGOProfile/memop_size_opt_zero.ll