LLVM  8.0.1
Classes | Namespaces | Functions
Cloning.h File Reference
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Analysis/AssumptionCache.h"
#include "llvm/Analysis/InlineCost.h"
#include "llvm/IR/CallSite.h"
#include "llvm/IR/ValueHandle.h"
#include "llvm/Transforms/Utils/ValueMapper.h"
#include <functional>
#include <memory>
#include <vector>
Include dependency graph for Cloning.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  llvm::ClonedCodeInfo
 This struct can be used to capture information about code being cloned, while it is being cloned. More...
 
class  llvm::InlineFunctionInfo
 This class captures the data input to the InlineFunction call, and records the auxiliary results produced by it. More...
 

Namespaces

 llvm
 This class represents lattice values for constants.
 

Functions

std::unique_ptr< Modulellvm::CloneModule (const Module &M)
 Return an exact copy of the specified module. More...
 
std::unique_ptr< Modulellvm::CloneModule (const Module &M, ValueToValueMapTy &VMap)
 
std::unique_ptr< Modulellvm::CloneModule (const Module &M, ValueToValueMapTy &VMap, function_ref< bool(const GlobalValue *)> ShouldCloneDefinition)
 Return a copy of the specified module. More...
 
BasicBlockllvm::CloneBasicBlock (const BasicBlock *BB, ValueToValueMapTy &VMap, const Twine &NameSuffix="", Function *F=nullptr, ClonedCodeInfo *CodeInfo=nullptr, DebugInfoFinder *DIFinder=nullptr)
 Return a copy of the specified basic block, but without embedding the block into a particular function. More...
 
Functionllvm::CloneFunction (Function *F, ValueToValueMapTy &VMap, ClonedCodeInfo *CodeInfo=nullptr)
 Return a copy of the specified function and add it to that function's module. More...
 
void llvm::CloneFunctionInto (Function *NewFunc, const Function *OldFunc, ValueToValueMapTy &VMap, bool ModuleLevelChanges, SmallVectorImpl< ReturnInst *> &Returns, const char *NameSuffix="", ClonedCodeInfo *CodeInfo=nullptr, ValueMapTypeRemapper *TypeMapper=nullptr, ValueMaterializer *Materializer=nullptr)
 Clone OldFunc into NewFunc, transforming the old arguments into references to VMap values. More...
 
void llvm::CloneAndPruneIntoFromInst (Function *NewFunc, const Function *OldFunc, const Instruction *StartingInst, ValueToValueMapTy &VMap, bool ModuleLevelChanges, SmallVectorImpl< ReturnInst *> &Returns, const char *NameSuffix="", ClonedCodeInfo *CodeInfo=nullptr)
 This works like CloneAndPruneFunctionInto, except that it does not clone the entire function. More...
 
void llvm::CloneAndPruneFunctionInto (Function *NewFunc, const Function *OldFunc, ValueToValueMapTy &VMap, bool ModuleLevelChanges, SmallVectorImpl< ReturnInst *> &Returns, const char *NameSuffix="", ClonedCodeInfo *CodeInfo=nullptr, Instruction *TheCall=nullptr)
 This works exactly like CloneFunctionInto, except that it does some simple constant prop and DCE on the fly. More...
 
InlineResult llvm::InlineFunction (CallInst *C, InlineFunctionInfo &IFI, AAResults *CalleeAAR=nullptr, bool InsertLifetime=true)
 This function inlines the called function into the basic block of the caller. More...
 
InlineResult llvm::InlineFunction (InvokeInst *II, InlineFunctionInfo &IFI, AAResults *CalleeAAR=nullptr, bool InsertLifetime=true)
 
InlineResult llvm::InlineFunction (CallSite CS, InlineFunctionInfo &IFI, AAResults *CalleeAAR=nullptr, bool InsertLifetime=true, Function *ForwardVarArgsTo=nullptr)
 This function inlines the called function into the basic block of the caller. More...
 
Loopllvm::cloneLoopWithPreheader (BasicBlock *Before, BasicBlock *LoopDomBB, Loop *OrigLoop, ValueToValueMapTy &VMap, const Twine &NameSuffix, LoopInfo *LI, DominatorTree *DT, SmallVectorImpl< BasicBlock *> &Blocks)
 Clones a loop OrigLoop. More...
 
void llvm::remapInstructionsInBlocks (const SmallVectorImpl< BasicBlock *> &Blocks, ValueToValueMapTy &VMap)
 Remaps instructions in Blocks using the mapping in VMap. More...
 
BasicBlockllvm::DuplicateInstructionsInSplitBetween (BasicBlock *BB, BasicBlock *PredBB, Instruction *StopAt, ValueToValueMapTy &ValueMapping, DomTreeUpdater &DTU)
 Split edge between BB and PredBB and duplicate all non-Phi instructions from BB between its beginning and the StopAt instruction into the split block. More...