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 // createAliasAnalysisCounterPass - This pass counts alias queries and how the
37 // alias analysis implementation responds.
39 ModulePass *createAliasAnalysisCounterPass();
41 //===--------------------------------------------------------------------===//
43 // createAAEvalPass - This pass implements a simple N^2 alias analysis
44 // accuracy evaluator.
46 FunctionPass *createAAEvalPass();
48 //===--------------------------------------------------------------------===//
50 // createNoAAPass - This pass implements a "I don't know" alias analysis.
52 ImmutablePass *createNoAAPass();
54 //===--------------------------------------------------------------------===//
56 // createCFLAliasAnalysisPass - This pass implements a set-based approach to
59 ImmutablePass *createCFLAliasAnalysisPass();
61 //===--------------------------------------------------------------------===//
63 /// createLibCallAliasAnalysisPass - Create an alias analysis pass that knows
64 /// about the semantics of a set of libcalls specified by LCI. The newly
65 /// constructed pass takes ownership of the pointer that is provided.
67 FunctionPass *createLibCallAliasAnalysisPass(LibCallInfo *LCI);
69 //===--------------------------------------------------------------------===//
71 // createScalarEvolutionAliasAnalysisPass - This pass implements a simple
72 // alias analysis using ScalarEvolution queries.
74 FunctionPass *createScalarEvolutionAliasAnalysisPass();
76 //===--------------------------------------------------------------------===//
78 // createTypeBasedAliasAnalysisPass - This pass implements metadata-based
79 // type-based alias analysis.
81 ImmutablePass *createTypeBasedAliasAnalysisPass();
83 //===--------------------------------------------------------------------===//
85 // createScopedNoAliasAAPass - This pass implements metadata-based
86 // scoped noalias analysis.
88 ImmutablePass *createScopedNoAliasAAPass();
90 //===--------------------------------------------------------------------===//
92 // createObjCARCAliasAnalysisPass - This pass implements ObjC-ARC-based
95 ImmutablePass *createObjCARCAliasAnalysisPass();
97 FunctionPass *createPAEvalPass();
99 //===--------------------------------------------------------------------===//
101 /// createLazyValueInfoPass - This creates an instance of the LazyValueInfo
103 FunctionPass *createLazyValueInfoPass();
105 //===--------------------------------------------------------------------===//
107 // createDependenceAnalysisPass - This creates an instance of the
108 // DependenceAnalysis pass.
110 FunctionPass *createDependenceAnalysisPass();
112 //===--------------------------------------------------------------------===//
114 // createCostModelAnalysisPass - This creates an instance of the
115 // CostModelAnalysis pass.
117 FunctionPass *createCostModelAnalysisPass();
119 //===--------------------------------------------------------------------===//
121 // createDelinearizationPass - This pass implements attempts to restore
122 // multidimensional array indices from linearized expressions.
124 FunctionPass *createDelinearizationPass();
126 //===--------------------------------------------------------------------===//
128 // createDivergenceAnalysisPass - This pass determines which branches in a GPU
129 // program are divergent.
131 FunctionPass *createDivergenceAnalysisPass();
133 //===--------------------------------------------------------------------===//
135 // Minor pass prototypes, allowing us to expose them through bugpoint and
137 FunctionPass *createInstCountPass();
139 //===--------------------------------------------------------------------===//
141 // createRegionInfoPass - This pass finds all single entry single exit regions
142 // in a function and builds the region hierarchy.
144 FunctionPass *createRegionInfoPass();
146 // Print module-level debug info metadata in human-readable form.
147 ModulePass *createModuleDebugInfoPrinterPass();
149 //===--------------------------------------------------------------------===//
151 // createMemDepPrinter - This pass exhaustively collects all memdep
152 // information and prints it with -analyze.
154 FunctionPass *createMemDepPrinter();
156 //===--------------------------------------------------------------------===//
158 // createMemDerefPrinter - This pass collects memory dereferenceability
159 // information and prints it with -analyze.
161 FunctionPass *createMemDerefPrinter();