diff options
Diffstat (limited to 'include/llvm/Transforms/FunctionInlining.h')
-rw-r--r-- | include/llvm/Transforms/FunctionInlining.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/include/llvm/Transforms/FunctionInlining.h b/include/llvm/Transforms/FunctionInlining.h index b314b97bed..5a87c1b8e5 100644 --- a/include/llvm/Transforms/FunctionInlining.h +++ b/include/llvm/Transforms/FunctionInlining.h @@ -7,20 +7,22 @@ #ifndef LLVM_OPT_METHOD_INLINING_H #define LLVM_OPT_METHOD_INLINING_H -#include "llvm/Module.h" +#include "llvm/Transforms/Pass.h" #include "llvm/BasicBlock.h" class CallInst; namespace opt { -// DoMethodInlining - Use a heuristic based approach to inline methods that seem -// to look good. -// -bool DoMethodInlining(Method *M); +struct MethodInlining : public StatelessPass<MethodInlining> { + // DoMethodInlining - Use a heuristic based approach to inline methods that + // seem to look good. + // + static bool doMethodInlining(Method *M); -static inline bool DoMethodInlining(Module *M) { - return M->reduceApply(DoMethodInlining); -} + inline static bool doPerMethodWork(Method *M) { + return doMethodInlining(M); + } +}; // InlineMethod - This function forcibly inlines the called method into the // basic block of the caller. This returns true if it is not possible to inline |