Move the function extractor pass from tools/extract into lib/Xform/IPO
[oota-llvm.git] / include / llvm / Transforms / FunctionInlining.h
1 //===-- FunctionInlining.h - Functions that perform Inlining -----*- C++ -*--=//
2 //
3 // This family of functions is useful for performing function inlining.
4 //
5 //===----------------------------------------------------------------------===//
6
7 #ifndef LLVM_TRANSFORMS_FUNCTION_INLINING_H
8 #define LLVM_TRANSFORMS_FUNCTION_INLINING_H
9
10 class CallInst;
11 class Pass;
12
13 Pass *createFunctionInliningPass();
14
15 // InlineFunction - This function forcibly inlines the called function into the
16 // basic block of the caller.  This returns true if it is not possible to inline
17 // this call.  The program is still in a well defined state if this occurs 
18 // though.
19 //
20 // Note that this only does one level of inlining.  For example, if the 
21 // instruction 'call B' is inlined, and 'B' calls 'C', then the call to 'C' now 
22 // exists in the instruction stream.  Similiarly this will inline a recursive
23 // function by one level.
24 //
25 bool InlineFunction(CallInst *C);
26
27 #endif