Chris Lattner | 259a9b2 | 2002-07-23 19:56:27 +0000 | [diff] [blame^] | 1 | //===- llvm/Transforms/IPO.h - Interprocedural Transformations --*- C++ -*-===// |
Chris Lattner | b3f4d1b | 2001-10-31 04:32:53 +0000 | [diff] [blame] | 2 | // |
Chris Lattner | 259a9b2 | 2002-07-23 19:56:27 +0000 | [diff] [blame^] | 3 | // This header file defines prototypes for accessor functions that expose passes |
| 4 | // in the IPO transformations library. |
Chris Lattner | b3f4d1b | 2001-10-31 04:32:53 +0000 | [diff] [blame] | 5 | // |
| 6 | //===----------------------------------------------------------------------===// |
| 7 | |
Chris Lattner | 86fa226 | 2002-07-23 19:48:52 +0000 | [diff] [blame] | 8 | #ifndef LLVM_TRANSFORMS_IPO_H |
| 9 | #define LLVM_TRANSFORMS_IPO_H |
Chris Lattner | b3f4d1b | 2001-10-31 04:32:53 +0000 | [diff] [blame] | 10 | |
Chris Lattner | 04805fa | 2002-02-26 21:46:54 +0000 | [diff] [blame] | 11 | class Pass; |
Chris Lattner | 8e79dbf | 2002-04-10 20:31:22 +0000 | [diff] [blame] | 12 | |
Chris Lattner | 86fa226 | 2002-07-23 19:48:52 +0000 | [diff] [blame] | 13 | //===----------------------------------------------------------------------===// |
Chris Lattner | 259a9b2 | 2002-07-23 19:56:27 +0000 | [diff] [blame^] | 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 | //===----------------------------------------------------------------------===// |
Chris Lattner | 86fa226 | 2002-07-23 19:48:52 +0000 | [diff] [blame] | 24 | // createDeadTypeEliminationPass - Return a new pass that eliminates symbol |
| 25 | // table entries for types that are never used. |
Chris Lattner | 8e79dbf | 2002-04-10 20:31:22 +0000 | [diff] [blame] | 26 | // |
Chris Lattner | 86fa226 | 2002-07-23 19:48:52 +0000 | [diff] [blame] | 27 | Pass *createDeadTypeEliminationPass(); |
Chris Lattner | b3f4d1b | 2001-10-31 04:32:53 +0000 | [diff] [blame] | 28 | |
Chris Lattner | 8e79dbf | 2002-04-10 20:31:22 +0000 | [diff] [blame] | 29 | |
Chris Lattner | 86fa226 | 2002-07-23 19:48:52 +0000 | [diff] [blame] | 30 | //===----------------------------------------------------------------------===// |
Chris Lattner | 8e79dbf | 2002-04-10 20:31:22 +0000 | [diff] [blame] | 31 | // FunctionResolvingPass - Go over the functions that are in the module and |
| 32 | // look for functions that have the same name. More often than not, there will |
| 33 | // be things like: |
| 34 | // void "foo"(...) |
| 35 | // void "foo"(int, int) |
| 36 | // because of the way things are declared in C. If this is the case, patch |
| 37 | // things up. |
| 38 | // |
| 39 | // This is an interprocedural pass. |
| 40 | // |
| 41 | Pass *createFunctionResolvingPass(); |
| 42 | |
Chris Lattner | b3f4d1b | 2001-10-31 04:32:53 +0000 | [diff] [blame] | 43 | #endif |