Add new constructors for LoopInfo/DominatorTree/BFI/BPI
authorCong Hou <congh@google.com>
Thu, 16 Jul 2015 23:23:35 +0000 (23:23 +0000)
committerCong Hou <congh@google.com>
Thu, 16 Jul 2015 23:23:35 +0000 (23:23 +0000)
commit1dd3d83c5e56370acb4736182382db4deb70738e
tree731852419198ec9625b955349dc29e40498e58cb
parent650d9427f075becaa35a675af8169f60eeb8e756
Add new constructors for LoopInfo/DominatorTree/BFI/BPI

Those new constructors make it more natural to construct an object for a function. For example, previously to build a LoopInfo for a function, we need four statements:

DominatorTree DT;
LoopInfo LI;
DT.recalculate(F);
LI.analyze(DT);

Now we only need one statement:

LoopInfo LI(DominatorTree(F));

http://reviews.llvm.org/D11274

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242486 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/BlockFrequencyInfo.h
include/llvm/Analysis/BranchProbabilityInfo.h
include/llvm/Analysis/LoopInfo.h
include/llvm/IR/Dominators.h
lib/Analysis/BlockFrequencyInfo.cpp
lib/Analysis/LoopInfo.cpp