2004-02-28 03:33:30 +00:00
|
|
|
//===-- Transform/Utils/FunctionUtils.h - Function Utils --------*- C++ -*-===//
|
2005-04-21 20:59:05 +00:00
|
|
|
//
|
2004-02-28 03:33:30 +00:00
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file was developed by the LLVM research group and is distributed under
|
|
|
|
// the University of Illinois Open Source License. See LICENSE.TXT for details.
|
2005-04-21 20:59:05 +00:00
|
|
|
//
|
2004-02-28 03:33:30 +00:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
2004-03-02 00:20:32 +00:00
|
|
|
// This family of transformations manipulate LLVM functions.
|
2004-02-28 03:33:30 +00:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef LLVM_TRANSFORMS_UTILS_FUNCTION_H
|
|
|
|
#define LLVM_TRANSFORMS_UTILS_FUNCTION_H
|
|
|
|
|
2004-03-18 03:14:56 +00:00
|
|
|
#include <vector>
|
|
|
|
|
2004-02-28 03:33:30 +00:00
|
|
|
namespace llvm {
|
2004-03-18 03:14:56 +00:00
|
|
|
class BasicBlock;
|
2006-11-05 19:31:28 +00:00
|
|
|
class DominatorSet;
|
2004-03-18 03:47:46 +00:00
|
|
|
class Function;
|
|
|
|
class Loop;
|
2005-04-21 20:59:05 +00:00
|
|
|
|
2004-03-18 03:47:46 +00:00
|
|
|
/// ExtractCodeRegion - rip out a sequence of basic blocks into a new function
|
|
|
|
///
|
|
|
|
Function* ExtractCodeRegion(DominatorSet &DS,
|
2004-04-23 23:54:34 +00:00
|
|
|
const std::vector<BasicBlock*> &code,
|
|
|
|
bool AggregateArgs = false);
|
2004-03-18 03:47:46 +00:00
|
|
|
|
|
|
|
/// ExtractLoop - rip out a natural loop into a new function
|
|
|
|
///
|
2004-04-23 23:54:34 +00:00
|
|
|
Function* ExtractLoop(DominatorSet &DS, Loop *L,
|
|
|
|
bool AggregateArgs = false);
|
2004-03-18 03:47:46 +00:00
|
|
|
|
|
|
|
/// ExtractBasicBlock - rip out a basic block into a new function
|
|
|
|
///
|
2004-04-23 23:54:34 +00:00
|
|
|
Function* ExtractBasicBlock(BasicBlock *BB, bool AggregateArgs = false);
|
2004-02-28 03:33:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|