summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineLoopInfo.cpp
diff options
context:
space:
mode:
authorHiroshi Yamauchi <yamauchi@google.com>2019-10-28 12:35:34 -0700
committerHiroshi Yamauchi <yamauchi@google.com>2019-10-28 12:57:26 -0700
commit75f72f6b73180ca7c777915a20b293b89ebd142b (patch)
tree90baa76f2de70ca373d02084487ccc5a2e4598d5 /llvm/lib/CodeGen/MachineLoopInfo.cpp
parentc7557dd692368d8ac3fc330d698b536e78560ac4 (diff)
downloadbcm5719-llvm-75f72f6b73180ca7c777915a20b293b89ebd142b.tar.gz
bcm5719-llvm-75f72f6b73180ca7c777915a20b293b89ebd142b.zip
[PGO][PGSO] SizeOpts changes.
Summary: (Split of off D67120) SizeOpts/MachineSizeOpts changes for profile guided size optimization. (A second try after previously committed as r375254 and reverted as r375375.) Subscribers: mgorny, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D69409
Diffstat (limited to 'llvm/lib/CodeGen/MachineLoopInfo.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineLoopInfo.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachineLoopInfo.cpp b/llvm/lib/CodeGen/MachineLoopInfo.cpp
index 3b8b430d1b0..85822a67149 100644
--- a/llvm/lib/CodeGen/MachineLoopInfo.cpp
+++ b/llvm/lib/CodeGen/MachineLoopInfo.cpp
@@ -36,11 +36,15 @@ INITIALIZE_PASS_END(MachineLoopInfo, "machine-loops",
char &llvm::MachineLoopInfoID = MachineLoopInfo::ID;
bool MachineLoopInfo::runOnMachineFunction(MachineFunction &) {
- releaseMemory();
- LI.analyze(getAnalysis<MachineDominatorTree>().getBase());
+ calculate(getAnalysis<MachineDominatorTree>());
return false;
}
+void MachineLoopInfo::calculate(MachineDominatorTree &MDT) {
+ releaseMemory();
+ LI.analyze(MDT.getBase());
+}
+
void MachineLoopInfo::getAnalysisUsage(AnalysisUsage &AU) const {
AU.setPreservesAll();
AU.addRequired<MachineDominatorTree>();
OpenPOWER on IntegriCloud