blob: 70b5d8aaef230fa8ad1d2cb76b08607f19a06e40 [file] [log] [blame]
Chris Lattner259a9b22002-07-23 19:56:27 +00001//===- llvm/Transforms/IPO.h - Interprocedural Transformations --*- C++ -*-===//
Chris Lattnerb3f4d1b2001-10-31 04:32:53 +00002//
Chris Lattner259a9b22002-07-23 19:56:27 +00003// This header file defines prototypes for accessor functions that expose passes
4// in the IPO transformations library.
Chris Lattnerb3f4d1b2001-10-31 04:32:53 +00005//
6//===----------------------------------------------------------------------===//
7
Chris Lattner86fa2262002-07-23 19:48:52 +00008#ifndef LLVM_TRANSFORMS_IPO_H
9#define LLVM_TRANSFORMS_IPO_H
Chris Lattnerb3f4d1b2001-10-31 04:32:53 +000010
Chris Lattner04805fa2002-02-26 21:46:54 +000011class Pass;
Chris Lattner8e79dbf2002-04-10 20:31:22 +000012
Chris Lattner86fa2262002-07-23 19:48:52 +000013//===----------------------------------------------------------------------===//
Chris Lattner259a9b22002-07-23 19:56:27 +000014// 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//
20Pass *createConstantMergePass();
21
22
23//===----------------------------------------------------------------------===//
Chris Lattner86fa2262002-07-23 19:48:52 +000024// createDeadTypeEliminationPass - Return a new pass that eliminates symbol
25// table entries for types that are never used.
Chris Lattner8e79dbf2002-04-10 20:31:22 +000026//
Chris Lattner86fa2262002-07-23 19:48:52 +000027Pass *createDeadTypeEliminationPass();
Chris Lattnerb3f4d1b2001-10-31 04:32:53 +000028
Chris Lattner8e79dbf2002-04-10 20:31:22 +000029
Chris Lattner86fa2262002-07-23 19:48:52 +000030//===----------------------------------------------------------------------===//
Chris Lattner8e79dbf2002-04-10 20:31:22 +000031// 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//
41Pass *createFunctionResolvingPass();
42
Chris Lattnerb3f4d1b2001-10-31 04:32:53 +000043#endif