LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Macros | Functions
ConstantMerge.cpp File Reference
#include "llvm/Transforms/IPO.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/PointerIntPair.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Operator.h"
#include "llvm/Pass.h"
Include dependency graph for ConstantMerge.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "constmerge"
 

Functions

 STATISTIC (NumMerged,"Number of global constants merged")
 
 INITIALIZE_PASS (ConstantMerge,"constmerge","Merge Duplicate Global Constants", false, false) ModulePass *llvm
 
static void FindUsedValues (GlobalVariable *LLVMUsed, SmallPtrSet< const GlobalValue *, 8 > &UsedValues)
 Find values that are marked as llvm.used. More...
 
static bool IsBetterCannonical (const GlobalVariable &A, const GlobalVariable &B)
 

Macro Definition Documentation

#define DEBUG_TYPE   "constmerge"

Definition at line 20 of file ConstantMerge.cpp.

Function Documentation

static void FindUsedValues ( GlobalVariable LLVMUsed,
SmallPtrSet< const GlobalValue *, 8 > &  UsedValues 
)
static
INITIALIZE_PASS ( ConstantMerge  ,
"constmerge"  ,
"Merge Duplicate Global Constants"  ,
false  ,
false   
)

Definition at line 59 of file ConstantMerge.cpp.

static bool IsBetterCannonical ( const GlobalVariable A,
const GlobalVariable B 
)
static
STATISTIC ( NumMerged  ,
"Number of global constants merged"   
)