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