• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===- LoopPassManager.cpp - Loop pass management -------------------------===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #include "llvm/Analysis/LoopPassManager.h"
11 #include "llvm/Analysis/BasicAliasAnalysis.h"
12 #include "llvm/Analysis/GlobalsModRef.h"
13 #include "llvm/Analysis/LoopInfo.h"
14 #include "llvm/Analysis/ScalarEvolution.h"
15 #include "llvm/Analysis/ScalarEvolutionAliasAnalysis.h"
16 #include "llvm/IR/Dominators.h"
17 
18 using namespace llvm;
19 
20 // Explicit instantiations for core typedef'ed templates.
21 namespace llvm {
22 template class PassManager<Loop>;
23 template class AnalysisManager<Loop>;
24 template class InnerAnalysisManagerProxy<LoopAnalysisManager, Function>;
25 template class OuterAnalysisManagerProxy<FunctionAnalysisManager, Loop>;
26 }
27 
getLoopPassPreservedAnalyses()28 PreservedAnalyses llvm::getLoopPassPreservedAnalyses() {
29   PreservedAnalyses PA;
30   PA.preserve<DominatorTreeAnalysis>();
31   PA.preserve<LoopAnalysis>();
32   PA.preserve<ScalarEvolutionAnalysis>();
33   // TODO: What we really want to do here is preserve an AA category, but that
34   // concept doesn't exist yet.
35   PA.preserve<BasicAA>();
36   PA.preserve<GlobalsAA>();
37   PA.preserve<SCEVAA>();
38   return PA;
39 }
40