313aea2090e1db9f47d1fbf9c51c65b3ab4dd955
[oota-llvm.git] / include / llvm / Transforms / IPO.h
1 //===- llvm/Transforms/CleanupGCCOutput.h - Cleanup GCC Output ---*- C++ -*--=//
2 //
3 //
4 //===----------------------------------------------------------------------===//
5
6 #ifndef LLVM_TRANSFORMS_CLEANUPGCCOUTPUT_H
7 #define LLVM_TRANSFORMS_CLEANUPGCCOUTPUT_H
8
9 #include "llvm/Pass.h"
10
11 struct CleanupGCCOutput : public MethodPass {
12   // PatchUpMethodReferences - This is a part of the functionality exported by
13   // the CleanupGCCOutput pass.  This causes functions with different signatures
14   // to be linked together if they have the same name.
15   //
16   static bool PatchUpMethodReferences(Module *M);
17
18   // doPassInitialization - For this pass, it removes global symbol table
19   // entries for primitive types.  These are never used for linking in GCC and
20   // they make the output uglier to look at, so we nuke them.
21   //
22   // Also, initialize instance variables.
23   //
24   bool doInitialization(Module *M);
25
26   // doPerMethodWork - This method simplifies the specified method hopefully.
27   //
28   bool runOnMethod(Method *M);
29
30   // doPassFinalization - Strip out type names that are unused by the program
31   bool doFinalization(Module *M);
32
33   // getAnalysisUsageInfo - This function needs FindUsedTypes to do its job...
34   //
35   virtual void getAnalysisUsageInfo(Pass::AnalysisSet &Required,
36                                     Pass::AnalysisSet &Destroyed,
37                                     Pass::AnalysisSet &Provided);
38 };
39
40 #endif