LLVM API Documentation

Classes | Namespaces | Defines | Functions
MergeFunctions.cpp File Reference
#include "llvm/Transforms/IPO.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/FoldingSet.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/IR/CallSite.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/InlineAsm.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Operator.h"
#include "llvm/IR/ValueHandle.h"
#include "llvm/Pass.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
#include <vector>
Include dependency graph for MergeFunctions.cpp:

Go to the source code of this file.


struct  llvm::DenseMapInfo< ComparableFunction >


namespace  llvm

List of target independent CodeGen pass IDs.


#define DEBUG_TYPE   "mergefunc"


 STATISTIC (NumFunctionsMerged,"Number of functions merged")
 STATISTIC (NumThunksWritten,"Number of thunks generated")
 STATISTIC (NumAliasesWritten,"Number of aliases generated")
 STATISTIC (NumDoubleWeak,"Number of new functions created")
static Type::TypeID getTypeIDForHash (Type *Ty)
static unsigned profileFunction (const Function *F)
static ValuecreateCast (IRBuilder< false > &Builder, Value *V, Type *DestTy)

Define Documentation

#define DEBUG_TYPE   "mergefunc"

Definition at line 46 of file MergeFunctions.cpp.

Function Documentation

static Value* createCast ( IRBuilder< false > &  Builder,
Value V,
Type DestTy 
) [static]
static Type::TypeID getTypeIDForHash ( Type Ty) [static]

Returns the type id for a type to be hashed. We turn pointer types into integers here because the actual compare logic below considers pointers and integers of the same size as equal.

Definition at line 78 of file MergeFunctions.cpp.

References llvm::Type::getTypeID(), llvm::Type::IntegerTyID, and llvm::Type::isPointerTy().

Referenced by profileFunction().

static unsigned profileFunction ( const Function F) [static]
STATISTIC ( NumFunctionsMerged  ,
"Number of functions merged"   
STATISTIC ( NumThunksWritten  ,
"Number of thunks generated"   
STATISTIC ( NumAliasesWritten  ,
"Number of aliases generated"   
STATISTIC ( NumDoubleWeak  ,
"Number of new functions created"