LLVM API Documentation
#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/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/Pass.h"
#include "llvm/Support/CallSite.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/ValueHandle.h"
#include "llvm/Support/raw_ostream.h"
#include <vector>
Go to the source code of this file.
Classes | |
struct | llvm::DenseMapInfo< ComparableFunction > |
Namespaces | |
llvm | |
List of target independent CodeGen pass IDs. | |
Macros | |
#define | DEBUG_TYPE "mergefunc" |
Functions | |
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 Value * | createCast (IRBuilder< false > &Builder, Value *V, Type *DestTy) |
#define DEBUG_TYPE "mergefunc" |
Definition at line 46 of file MergeFunctions.cpp.
Definition at line 727 of file MergeFunctions.cpp.
References llvm::IRBuilder< preserveNames, T, Inserter >::CreateBitCast(), llvm::IRBuilder< preserveNames, T, Inserter >::CreateIntToPtr(), llvm::IRBuilder< preserveNames, T, Inserter >::CreatePtrToInt(), llvm::Value::getType(), llvm::Type::isIntegerTy(), and llvm::Type::isPointerTy().
|
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().
Creates a hash-code for the function which is the same for any two functions that will compare equal, without looking at the instructions inside the function.
Definition at line 87 of file MergeFunctions.cpp.
References llvm::FoldingSetNodeID::AddBoolean(), llvm::FoldingSetNodeID::AddInteger(), llvm::FoldingSetNodeID::ComputeHash(), llvm::Function::getCallingConv(), llvm::Function::getFunctionType(), llvm::FunctionType::getNumParams(), llvm::FunctionType::getParamType(), llvm::FunctionType::getReturnType(), getTypeIDForHash(), llvm::Function::hasGC(), llvm::FunctionType::isVarArg(), and llvm::Function::size().
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" | |||
) |