Expunge DomSet from CodeExtractor. This is part of the continuing work
[oota-llvm.git] / include / llvm / Transforms / Utils / FunctionUtils.h
1 //===-- Transform/Utils/FunctionUtils.h - Function Utils --------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
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.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This family of transformations manipulate LLVM functions.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef LLVM_TRANSFORMS_UTILS_FUNCTION_H
15 #define LLVM_TRANSFORMS_UTILS_FUNCTION_H
16
17 #include <llvm/Analysis/Dominators.h>
18 #include <vector>
19
20 namespace llvm {
21   class BasicBlock;
22   class DominatorSet;
23   class Function;
24   class Loop;
25
26   /// ExtractCodeRegion - rip out a sequence of basic blocks into a new function
27   ///
28   Function* ExtractCodeRegion(ETForest &DS, DominatorTree& DT,
29                               const std::vector<BasicBlock*> &code,
30                               bool AggregateArgs = false);
31
32   /// ExtractLoop - rip out a natural loop into a new function
33   ///
34   Function* ExtractLoop(ETForest &DS, DominatorTree& DT, Loop *L,
35                         bool AggregateArgs = false);
36
37   /// ExtractBasicBlock - rip out a basic block into a new function
38   ///
39   Function* ExtractBasicBlock(BasicBlock *BB, bool AggregateArgs = false);
40 }
41
42 #endif