1 //===-- Transform/Utils/FunctionUtils.h - Function Utils --------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file was developed by the LLVM research group and is distributed under
6 // the University of Illinois Open Source License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This family of transformations manipulate LLVM functions.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_TRANSFORMS_UTILS_FUNCTION_H
15 #define LLVM_TRANSFORMS_UTILS_FUNCTION_H
22 /// ExtractCodeRegion - rip out a sequence of basic blocks into a new function
24 Function* ExtractCodeRegion(const std::vector<BasicBlock*> &code);
26 /// ExtractLoop - rip out a natural loop into a new function
28 Function* ExtractLoop(Loop *L);
30 /// ExtractBasicBlock - rip out a basic block into a new function
32 Function* ExtractBasicBlock(BasicBlock *BB);