1 //===-- llvm/Analysis/Passes.h - Constructors for analyses ------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This header file defines prototypes for accessor functions that expose passes
11 // in the analysis libraries.
13 //===----------------------------------------------------------------------===//
15 #ifndef LLVM_ANALYSIS_PASSES_H
16 #define LLVM_ANALYSIS_PASSES_H
27 //===--------------------------------------------------------------------===//
29 // createGlobalsModRefPass - This pass provides alias and mod/ref info for
30 // global values that do not have their addresses taken.
32 Pass *createGlobalsModRefPass();
34 //===--------------------------------------------------------------------===//
36 // createAliasDebugger - This pass helps debug clients of AA
38 Pass *createAliasDebugger();
40 //===--------------------------------------------------------------------===//
42 // createAliasAnalysisCounterPass - This pass counts alias queries and how the
43 // alias analysis implementation responds.
45 ModulePass *createAliasAnalysisCounterPass();
47 //===--------------------------------------------------------------------===//
49 // createAAEvalPass - This pass implements a simple N^2 alias analysis
50 // accuracy evaluator.
52 FunctionPass *createAAEvalPass();
54 //===--------------------------------------------------------------------===//
56 // createNoAAPass - This pass implements a "I don't know" alias analysis.
58 ImmutablePass *createNoAAPass();
60 //===--------------------------------------------------------------------===//
62 // createBasicAliasAnalysisPass - This pass implements the stateless alias
65 ImmutablePass *createBasicAliasAnalysisPass();
67 //===--------------------------------------------------------------------===//
69 /// createLibCallAliasAnalysisPass - Create an alias analysis pass that knows
70 /// about the semantics of a set of libcalls specified by LCI. The newly
71 /// constructed pass takes ownership of the pointer that is provided.
73 FunctionPass *createLibCallAliasAnalysisPass(LibCallInfo *LCI);
75 //===--------------------------------------------------------------------===//
77 // createScalarEvolutionAliasAnalysisPass - This pass implements a simple
78 // alias analysis using ScalarEvolution queries.
80 FunctionPass *createScalarEvolutionAliasAnalysisPass();
82 //===--------------------------------------------------------------------===//
84 // createTypeBasedAliasAnalysisPass - This pass implements metadata-based
85 // type-based alias analysis.
87 ImmutablePass *createTypeBasedAliasAnalysisPass();
89 //===--------------------------------------------------------------------===//
91 // createObjCARCAliasAnalysisPass - This pass implements ObjC-ARC-based
94 ImmutablePass *createObjCARCAliasAnalysisPass();
96 //===--------------------------------------------------------------------===//
98 // createProfileLoaderPass - This pass loads information from a profile dump
101 ModulePass *createProfileLoaderPass();
102 extern char &ProfileLoaderPassID;
104 //===--------------------------------------------------------------------===//
106 // createProfileMetadataLoaderPass - This pass loads information from a
107 // profile dump file and sets branch weight metadata.
109 ModulePass *createProfileMetadataLoaderPass();
110 extern char &ProfileMetadataLoaderPassID;
112 //===--------------------------------------------------------------------===//
114 // createNoProfileInfoPass - This pass implements the default "no profile".
116 ImmutablePass *createNoProfileInfoPass();
118 //===--------------------------------------------------------------------===//
120 // createProfileEstimatorPass - This pass estimates profiling information
121 // instead of loading it from a previous run.
123 FunctionPass *createProfileEstimatorPass();
124 extern char &ProfileEstimatorPassID;
126 //===--------------------------------------------------------------------===//
128 // createProfileVerifierPass - This pass verifies profiling information.
130 FunctionPass *createProfileVerifierPass();
132 //===--------------------------------------------------------------------===//
134 // createPathProfileLoaderPass - This pass loads information from a path
135 // profile dump file.
137 ModulePass *createPathProfileLoaderPass();
138 extern char &PathProfileLoaderPassID;
140 //===--------------------------------------------------------------------===//
142 // createNoPathProfileInfoPass - This pass implements the default
143 // "no path profile".
145 ImmutablePass *createNoPathProfileInfoPass();
147 //===--------------------------------------------------------------------===//
149 // createPathProfileVerifierPass - This pass verifies path profiling
152 ModulePass *createPathProfileVerifierPass();
154 //===--------------------------------------------------------------------===//
156 // createDSAAPass - This pass implements simple context sensitive alias
159 ModulePass *createDSAAPass();
161 //===--------------------------------------------------------------------===//
163 // createDSOptPass - This pass uses DSA to do a series of simple
166 ModulePass *createDSOptPass();
168 //===--------------------------------------------------------------------===//
170 // createSteensgaardPass - This pass uses the data structure graphs to do a
171 // simple context insensitive alias analysis.
173 ModulePass *createSteensgaardPass();
175 //===--------------------------------------------------------------------===//
177 /// createLazyValueInfoPass - This creates an instance of the LazyValueInfo
179 FunctionPass *createLazyValueInfoPass();
181 //===--------------------------------------------------------------------===//
183 // createDependenceAnalysisPass - This creates an instance of the
184 // DependenceAnalysis pass.
186 FunctionPass *createDependenceAnalysisPass();
188 //===--------------------------------------------------------------------===//
190 // createCostModelAnalysisPass - This creates an instance of the
191 // CostModelAnalysis pass.
193 FunctionPass *createCostModelAnalysisPass();
195 //===--------------------------------------------------------------------===//
197 // Minor pass prototypes, allowing us to expose them through bugpoint and
199 FunctionPass *createInstCountPass();
201 // print debug info intrinsics in human readable form
202 FunctionPass *createDbgInfoPrinterPass();
204 //===--------------------------------------------------------------------===//
206 // createRegionInfoPass - This pass finds all single entry single exit regions
207 // in a function and builds the region hierarchy.
209 FunctionPass *createRegionInfoPass();
211 // Print module-level debug info metadata in human-readable form.
212 ModulePass *createModuleDebugInfoPrinterPass();
214 //===--------------------------------------------------------------------===//
216 // createMemDepPrinter - This pass exhaustively collects all memdep
217 // information and prints it with -analyze.
219 FunctionPass *createMemDepPrinter();