diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2015-01-17 14:16:18 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2015-01-17 14:16:18 +0000 |
commit | 4f8f307c77fa5b4de2eec8868b8734b2ab93dd22 (patch) | |
tree | 5c9be8d4edf8e4e9c5cabcde80b0ce461f5d6254 /llvm/lib/Analysis/LoopPass.cpp | |
parent | 74e7fb9aaeb1b21cfb26cbaf0352ba6b5f9fb272 (diff) | |
download | bcm5719-llvm-4f8f307c77fa5b4de2eec8868b8734b2ab93dd22.tar.gz bcm5719-llvm-4f8f307c77fa5b4de2eec8868b8734b2ab93dd22.zip |
[PM] Split the LoopInfo object apart from the legacy pass, creating
a LoopInfoWrapperPass to wire the object up to the legacy pass manager.
This switches all the clients of LoopInfo over and paves the way to port
LoopInfo to the new pass manager. No functionality change is intended
with this iteration.
llvm-svn: 226373
Diffstat (limited to 'llvm/lib/Analysis/LoopPass.cpp')
-rw-r--r-- | llvm/lib/Analysis/LoopPass.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/LoopPass.cpp b/llvm/lib/Analysis/LoopPass.cpp index 190abc73fbb..a99c949e10f 100644 --- a/llvm/lib/Analysis/LoopPass.cpp +++ b/llvm/lib/Analysis/LoopPass.cpp @@ -187,14 +187,15 @@ static void addLoopIntoQueue(Loop *L, std::deque<Loop *> &LQ) { void LPPassManager::getAnalysisUsage(AnalysisUsage &Info) const { // LPPassManager needs LoopInfo. In the long term LoopInfo class will // become part of LPPassManager. - Info.addRequired<LoopInfo>(); + Info.addRequired<LoopInfoWrapperPass>(); Info.setPreservesAll(); } /// run - Execute all of the passes scheduled for execution. Keep track of /// whether any of the passes modifies the function, and if so, return true. bool LPPassManager::runOnFunction(Function &F) { - LI = &getAnalysis<LoopInfo>(); + auto &LIWP = getAnalysis<LoopInfoWrapperPass>(); + LI = &LIWP.getLoopInfo(); bool Changed = false; // Collect inherited analysis from Module level pass manager. @@ -262,7 +263,7 @@ bool LPPassManager::runOnFunction(Function &F) { // loop in the function every time. That level of checking can be // enabled with the -verify-loop-info option. { - TimeRegion PassTimer(getPassTimer(LI)); + TimeRegion PassTimer(getPassTimer(&LIWP)); CurrentLoop->verifyLoop(); } |