Passes.h revision ead0109f5bc010af837d0fa7c9bb2401b34fb29d
1b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)//===-- llvm/Analysis/Passes.h - Constructors for analyses ------*- C++ -*-===//
2b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)//
3b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)//                     The LLVM Compiler Infrastructure
4b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)//
5b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)// This file is distributed under the University of Illinois Open Source
6b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)// License. See LICENSE.TXT for details.
7b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)//
8b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)//===----------------------------------------------------------------------===//
9b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)//
10b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)// This header file defines prototypes for accessor functions that expose passes
11b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)// in the analysis libraries.
12b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)//
13b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)//===----------------------------------------------------------------------===//
14b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)
15b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)#ifndef LLVM_ANALYSIS_PASSES_H
16b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)#define LLVM_ANALYSIS_PASSES_H
17b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)
184e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)namespace llvm {
19b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)  class FunctionPass;
20b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)  class ImmutablePass;
21b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)  class LoopPass;
22b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)  class ModulePass;
23424c4d7b64af9d0d8fd9624f381f469654d5e3d2Torne (Richard Coles)  class Pass;
24424c4d7b64af9d0d8fd9624f381f469654d5e3d2Torne (Richard Coles)  class PassInfo;
25b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)  class LibCallInfo;
26b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)
27b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)  //===--------------------------------------------------------------------===//
28b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)  //
29b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)  // createGlobalsModRefPass - This pass provides alias and mod/ref info for
30b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)  // global values that do not have their addresses taken.
31b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)  //
32b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)  Pass *createGlobalsModRefPass();
33b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)
34b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)  //===--------------------------------------------------------------------===//
35b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)  //
36b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)  // createAliasDebugger - This pass helps debug clients of AA
37b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)  //
38b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)  Pass *createAliasDebugger();
39b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)
40b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)  //===--------------------------------------------------------------------===//
41b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)  //
42b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)  // createAliasAnalysisCounterPass - This pass counts alias queries and how the
43b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)  // alias analysis implementation responds.
44b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)  //
45b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)  ModulePass *createAliasAnalysisCounterPass();
46b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)
47b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)  //===--------------------------------------------------------------------===//
48b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)  //
49b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)  // createAAEvalPass - This pass implements a simple N^2 alias analysis
50b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)  // accuracy evaluator.
51b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)  //
52b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)  FunctionPass *createAAEvalPass();
53b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)
54b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)  //===--------------------------------------------------------------------===//
55b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)  //
56b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)  // createNoAAPass - This pass implements a "I don't know" alias analysis.
57b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)  //
58b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)  ImmutablePass *createNoAAPass();
59b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)
60b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)  //===--------------------------------------------------------------------===//
61b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)  //
62b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)  // createBasicAliasAnalysisPass - This pass implements the default alias
63b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)  // analysis.
64b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)  //
65b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)  ImmutablePass *createBasicAliasAnalysisPass();
66b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)
67b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)  //===--------------------------------------------------------------------===//
68b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)  //
69b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)  /// createLibCallAliasAnalysisPass - Create an alias analysis pass that knows
70b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)  /// about the semantics of a set of libcalls specified by LCI.  The newly
71b2df76ea8fec9e32f6f3718986dba0d95315b29cTorne (Richard Coles)  /// constructed pass takes ownership of the pointer that is provided.
72  ///
73  FunctionPass *createLibCallAliasAnalysisPass(LibCallInfo *LCI);
74
75  //===--------------------------------------------------------------------===//
76  //
77  // createScalarEvolutionAliasAnalysisPass - This pass implements a simple
78  // alias analysis using ScalarEvolution queries.
79  //
80  FunctionPass *createScalarEvolutionAliasAnalysisPass();
81
82  //===--------------------------------------------------------------------===//
83  //
84  // createTypeBasedAliasAnalysisPass - This pass implements metadata-based
85  // type-based alias analysis.
86  //
87  ImmutablePass *createTypeBasedAliasAnalysisPass();
88
89  //===--------------------------------------------------------------------===//
90  //
91  // createProfileLoaderPass - This pass loads information from a profile dump
92  // file.
93  //
94  ModulePass *createProfileLoaderPass();
95  extern char &ProfileLoaderPassID;
96
97  //===--------------------------------------------------------------------===//
98  //
99  // createNoProfileInfoPass - This pass implements the default "no profile".
100  //
101  ImmutablePass *createNoProfileInfoPass();
102
103  //===--------------------------------------------------------------------===//
104  //
105  // createProfileEstimatorPass - This pass estimates profiling information
106  // instead of loading it from a previous run.
107  //
108  FunctionPass *createProfileEstimatorPass();
109  extern char &ProfileEstimatorPassID;
110
111  //===--------------------------------------------------------------------===//
112  //
113  // createProfileVerifierPass - This pass verifies profiling information.
114  //
115  FunctionPass *createProfileVerifierPass();
116
117  //===--------------------------------------------------------------------===//
118  //
119  // createDSAAPass - This pass implements simple context sensitive alias
120  // analysis.
121  //
122  ModulePass *createDSAAPass();
123
124  //===--------------------------------------------------------------------===//
125  //
126  // createDSOptPass - This pass uses DSA to do a series of simple
127  // optimizations.
128  //
129  ModulePass *createDSOptPass();
130
131  //===--------------------------------------------------------------------===//
132  //
133  // createSteensgaardPass - This pass uses the data structure graphs to do a
134  // simple context insensitive alias analysis.
135  //
136  ModulePass *createSteensgaardPass();
137
138  //===--------------------------------------------------------------------===//
139  //
140  // createLiveValuesPass - This creates an instance of the LiveValues pass.
141  //
142  FunctionPass *createLiveValuesPass();
143
144  //===--------------------------------------------------------------------===//
145  //
146  /// createLazyValueInfoPass - This creates an instance of the LazyValueInfo
147  /// pass.
148  FunctionPass *createLazyValueInfoPass();
149
150  //===--------------------------------------------------------------------===//
151  //
152  // createLoopDependenceAnalysisPass - This creates an instance of the
153  // LoopDependenceAnalysis pass.
154  //
155  LoopPass *createLoopDependenceAnalysisPass();
156
157  // Minor pass prototypes, allowing us to expose them through bugpoint and
158  // analyze.
159  FunctionPass *createInstCountPass();
160
161  // print debug info intrinsics in human readable form
162  FunctionPass *createDbgInfoPrinterPass();
163
164  //===--------------------------------------------------------------------===//
165  //
166  // createRegionInfoPass - This pass finds all single entry single exit regions
167  // in a function and builds the region hierarchy.
168  //
169  FunctionPass *createRegionInfoPass();
170
171  // Print module-level debug info metadata in human-readable form.
172  ModulePass *createModuleDebugInfoPrinterPass();
173
174  //===--------------------------------------------------------------------===//
175  //
176  // createMemDepPrinter - This pass exhaustively collects all memdep
177  // information and prints it with -analyze.
178  //
179  FunctionPass *createMemDepPrinter();
180}
181
182#endif
183