Change over to use new style pass mechanism, now passes only expose small
[oota-llvm.git] / include / llvm / Transforms / FunctionInlining.h
1 //===-- MethodInlining.h - Functions that perform Inlining -------*- C++ -*--=//
2 //
3 // This family of functions is useful for performing method inlining.
4 //
5 //===----------------------------------------------------------------------===//
6
7 #ifndef LLVM_TRANSFORMS_METHOD_INLINING_H
8 #define LLVM_TRANSFORMS_METHOD_INLINING_H
9
10 #include "llvm/BasicBlock.h"
11 class CallInst;
12 class Pass;
13
14 Pass *createMethodInliningPass();
15
16 // InlineMethod - This function forcibly inlines the called method into the
17 // basic block of the caller.  This returns true if it is not possible to inline
18 // this call.  The program is still in a well defined state if this occurs 
19 // though.
20 //
21 // Note that this only does one level of inlining.  For example, if the 
22 // instruction 'call B' is inlined, and 'B' calls 'C', then the call to 'C' now 
23 // exists in the instruction stream.  Similiarly this will inline a recursive
24 // method by one level.
25 //
26 bool InlineMethod(CallInst *C);
27 bool InlineMethod(BasicBlock::iterator CI);  // *CI must be CallInst
28
29 #endif