LLVM API Documentation

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

FunctionUtils.h

Go to the documentation of this file.
00001 //===-- Transform/Utils/FunctionUtils.h - Function Utils --------*- C++ -*-===//
00002 // 
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file was developed by the LLVM research group and is distributed under
00006 // the University of Illinois Open Source License. See LICENSE.TXT for details.
00007 // 
00008 //===----------------------------------------------------------------------===//
00009 //
00010 // This family of transformations manipulate LLVM functions.
00011 //
00012 //===----------------------------------------------------------------------===//
00013 
00014 #ifndef LLVM_TRANSFORMS_UTILS_FUNCTION_H
00015 #define LLVM_TRANSFORMS_UTILS_FUNCTION_H
00016 
00017 #include <vector>
00018 
00019 namespace llvm {
00020   class BasicBlock;
00021   struct DominatorSet;
00022   class Function;
00023   class Loop;
00024   
00025   /// ExtractCodeRegion - rip out a sequence of basic blocks into a new function
00026   ///
00027   Function* ExtractCodeRegion(DominatorSet &DS,
00028                               const std::vector<BasicBlock*> &code,
00029                               bool AggregateArgs = false);
00030 
00031   /// ExtractLoop - rip out a natural loop into a new function
00032   ///
00033   Function* ExtractLoop(DominatorSet &DS, Loop *L,
00034                         bool AggregateArgs = false);
00035 
00036   /// ExtractBasicBlock - rip out a basic block into a new function
00037   ///
00038   Function* ExtractBasicBlock(BasicBlock *BB, bool AggregateArgs = false);
00039 }
00040 
00041 #endif