Implement code to convert %malloc and %free FUNCTION CALLS into the instruction equiv...
[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 class CleanupGCCOutput : public Pass {
12   Method *Malloc, *Free;  // Pointers to external declarations, or null if none
13 public:
14
15   inline CleanupGCCOutput() : Malloc(0), Free(0) {}
16
17   // doPassInitialization - For this pass, it removes global symbol table
18   // entries for primitive types.  These are never used for linking in GCC and
19   // they make the output uglier to look at, so we nuke them.
20   //
21   // Also, initialize instance variables.
22   //
23   bool doPassInitialization(Module *M);
24
25   // doPerMethodWork - This method simplifies the specified method hopefully.
26   //
27   bool doPerMethodWork(Method *M);
28 private:
29   bool doOneCleanupPass(Method *M);
30 };
31
32 #endif