LLVM API Documentation
#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"
Go to the source code of this file.
Defines | |
| #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, SmallPtrSetImpl< const GlobalValue * > &UsedValues) |
| Find values that are marked as llvm.used. | |
| static bool | IsBetterCanonical (const GlobalVariable &A, const GlobalVariable &B) |
| #define DEBUG_TYPE "constmerge" |
Definition at line 33 of file ConstantMerge.cpp.
| static void FindUsedValues | ( | GlobalVariable * | LLVMUsed, |
| SmallPtrSetImpl< const GlobalValue * > & | UsedValues | ||
| ) | [static] |
Find values that are marked as llvm.used.
Definition at line 68 of file ConstantMerge.cpp.
References llvm::GlobalVariable::getInitializer(), llvm::User::getNumOperands(), llvm::User::getOperand(), llvm::SmallPtrSetImpl< PtrType >::insert(), and llvm::Value::stripPointerCastsNoFollowAliases().
| INITIALIZE_PASS | ( | ConstantMerge | , |
| "constmerge" | , | ||
| "Merge Duplicate Global Constants" | , | ||
| false | , | ||
| false | |||
| ) |
Definition at line 60 of file ConstantMerge.cpp.
| static bool IsBetterCanonical | ( | const GlobalVariable & | A, |
| const GlobalVariable & | B | ||
| ) | [static] |
Definition at line 81 of file ConstantMerge.cpp.
References llvm::GlobalValue::hasLocalLinkage(), and llvm::GlobalValue::hasUnnamedAddr().
| STATISTIC | ( | NumMerged | , |
| "Number of global constants merged" | |||
| ) |