LLVM API Documentation

MergeFunctions.cpp File Reference

#include "llvm/Transforms/IPO.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Constants.h"
#include "llvm/InlineAsm.h"
#include "llvm/Instructions.h"
#include "llvm/Module.h"
#include "llvm/Pass.h"
#include "llvm/Support/CallSite.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Debug.h"
#include <map>
#include <vector>

Include dependency graph for MergeFunctions.cpp:

Go to the source code of this file.

Defines

#define DEBUG_TYPE   "mergefunc"

Functions

 STATISTIC (NumFunctionsMerged,"Number of functions merged")
 STATISTIC (NumMergeFails,"Number of identical function pairings not merged")
ModulePass * llvm::createMergeFunctionsPass ()
static unsigned long hash (const Function *F)
static bool compare (const Value *V, const Value *U)
static bool equals (const BasicBlock *BB1, const BasicBlock *BB2, DenseMap< const Value *, const Value * > &ValueMap, DenseMap< const Value *, const Value * > &SpeculationMap)
static bool equals (const Function *F, const Function *G)
static bool fold (std::vector< Function * > &FnVec, unsigned i, unsigned j)
static bool hasAddressTaken (User *U)

Variables

static RegisterPass
< MergeFunctions > 
X ("mergefunc","Merge Functions")


Define Documentation

#define DEBUG_TYPE   "mergefunc"

Definition at line 48 of file MergeFunctions.cpp.


Function Documentation

static bool compare ( const Value *  V,
const Value *  U 
) [static]

static bool equals ( const Function *  F,
const Function *  G 
) [static]

static bool equals ( const BasicBlock *  BB1,
const BasicBlock *  BB2,
DenseMap< const Value *, const Value * > &  ValueMap,
DenseMap< const Value *, const Value * > &  SpeculationMap 
) [static]

static bool fold ( std::vector< Function * > &  FnVec,
unsigned  i,
unsigned  j 
) [static]

static bool hasAddressTaken ( User *  U  )  [static]

static unsigned long hash ( const Function *  F  )  [static]

STATISTIC ( NumMergeFails  ,
"Number of identical function pairings not merged"   
)

STATISTIC ( NumFunctionsMerged  ,
"Number of functions merged"   
)


Variable Documentation

char ID [static]

Definition at line 69 of file MergeFunctions.cpp.

RegisterPass<MergeFunctions> X("mergefunc","Merge Functions") [static]