2002-04-27 06:56:12 +00:00
|
|
|
//===-- FunctionInlining.h - Functions that perform Inlining -----*- C++ -*--=//
|
2001-06-30 04:34:07 +00:00
|
|
|
//
|
2002-04-27 06:56:12 +00:00
|
|
|
// This family of functions is useful for performing function inlining.
|
2001-06-30 04:34:07 +00:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2002-04-27 06:56:12 +00:00
|
|
|
#ifndef LLVM_TRANSFORMS_FUNCTION_INLINING_H
|
|
|
|
#define LLVM_TRANSFORMS_FUNCTION_INLINING_H
|
2001-06-30 04:34:07 +00:00
|
|
|
|
|
|
|
class CallInst;
|
2002-02-26 21:46:54 +00:00
|
|
|
class Pass;
|
2001-06-30 04:34:07 +00:00
|
|
|
|
2002-04-27 06:56:12 +00:00
|
|
|
Pass *createFunctionInliningPass();
|
2001-06-30 04:34:07 +00:00
|
|
|
|
2002-04-27 06:56:12 +00:00
|
|
|
// InlineFunction - This function forcibly inlines the called function into the
|
2001-06-30 04:34:07 +00:00
|
|
|
// basic block of the caller. This returns true if it is not possible to inline
|
|
|
|
// this call. The program is still in a well defined state if this occurs
|
|
|
|
// though.
|
|
|
|
//
|
|
|
|
// Note that this only does one level of inlining. For example, if the
|
|
|
|
// instruction 'call B' is inlined, and 'B' calls 'C', then the call to 'C' now
|
|
|
|
// exists in the instruction stream. Similiarly this will inline a recursive
|
2002-04-27 06:56:12 +00:00
|
|
|
// function by one level.
|
2001-06-30 04:34:07 +00:00
|
|
|
//
|
2002-04-27 06:56:12 +00:00
|
|
|
bool InlineFunction(CallInst *C);
|
2001-06-30 04:34:07 +00:00
|
|
|
|
|
|
|
#endif
|