Change over to use new style pass mechanism, now passes only expose small
[oota-llvm.git] / include / llvm / Transforms / IPO / ConstantMerge.h
1 //===- llvm/Transforms/ConstantMerge.h - Merge duplicate consts --*- C++ -*--=//
2 //
3 // This file defines the interface to a pass that merges duplicate global
4 // constants together into a single constant that is shared.  This is useful
5 // because some passes (ie TraceValues) insert a lot of string constants into
6 // the program, regardless of whether or not they duplicate an existing string.
7 //
8 // Algorithm: ConstantMerge is designed to build up a map of available constants
9 // and elminate duplicates when it is initialized.
10 //
11 // The DynamicConstantMerge method is a superset of the ConstantMerge algorithm
12 // that checks for each method to see if constants have been added to the
13 // constant pool since it was last run... if so, it processes them.
14 //
15 //===----------------------------------------------------------------------===//
16
17 #ifndef LLVM_TRANSFORMS_CONSTANTMERGE_H
18 #define LLVM_TRANSFORMS_CONSTANTMERGE_H
19
20 class Pass;
21 Pass *createConstantMergePass();
22 Pass *createDynamicConstantMergePass();
23
24 #endif