Move many files into IPO.h
[oota-llvm.git] / include / llvm / Transforms / IPO.h
1 //===- llvm/Transforms/IPO.h - Interprocedural Transformations --*- C++ -*-===//
2 //
3 // This header file defines prototypes for accessor functions that expose passes
4 // in the IPO transformations library.
5 //
6 //===----------------------------------------------------------------------===//
7
8 #ifndef LLVM_TRANSFORMS_IPO_H
9 #define LLVM_TRANSFORMS_IPO_H
10
11 class Pass;
12 class TargetData;
13
14 //===----------------------------------------------------------------------===//
15 // createConstantMergePass - This function returns a new pass that merges
16 // duplicate global constants together into a single constant that is shared.
17 // This is useful because some passes (ie TraceValues) insert a lot of string
18 // constants into the program, regardless of whether or not they duplicate an
19 // existing string.
20 //
21 Pass *createConstantMergePass();
22
23
24 //===----------------------------------------------------------------------===//
25 // createDeadTypeEliminationPass - Return a new pass that eliminates symbol
26 // table entries for types that are never used.
27 //
28 Pass *createDeadTypeEliminationPass();
29
30
31 //===----------------------------------------------------------------------===//
32 // createGlobalDCEPass - This transform is designed to eliminate unreachable
33 // internal globals (functions or global variables)
34 //
35 Pass *createGlobalDCEPass();
36
37
38 //===----------------------------------------------------------------------===//
39 // FunctionResolvingPass - Go over the functions that are in the module and
40 // look for functions that have the same name.  More often than not, there will
41 // be things like:
42 //    void "foo"(...)
43 //    void "foo"(int, int)
44 // because of the way things are declared in C.  If this is the case, patch
45 // things up.
46 //
47 // This is an interprocedural pass.
48 //
49 Pass *createFunctionResolvingPass();
50
51
52 //===----------------------------------------------------------------------===//
53 // createInternalizePass - This pass loops over all of the functions in the
54 // input module, looking for a main function.  If a main function is found, all
55 // other functions are marked as internal.
56 //
57 Pass *createInternalizePass();
58
59
60 //===----------------------------------------------------------------------===//
61 // createPoolAllocatePass - This transform changes programs so that disjoint
62 // data structures are allocated out of different pools of memory, increasing
63 // locality and shrinking pointer size.
64 //
65 Pass *createPoolAllocatePass();
66
67
68 //===----------------------------------------------------------------------===//
69 // These passes are wrappers that can do a few simple structure mutation
70 // transformations.
71 //
72 Pass *createSwapElementsPass(const TargetData &);
73 Pass *createSortElementsPass(const TargetData &);
74
75 #endif