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