LLVM API Documentation
#include "llvm/Transforms/Scalar.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/IR/Attributes.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/GlobalVariable.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/Module.h"
#include "llvm/Pass.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Target/TargetLowering.h"
#include "llvm/Target/TargetLoweringObjectFile.h"
#include "llvm/Target/TargetSubtargetInfo.h"
Go to the source code of this file.
Defines | |
#define | DEBUG_TYPE "global-merge" |
Functions | |
STATISTIC (NumMerged,"Number of globals merged") | |
INITIALIZE_TM_PASS (GlobalMerge,"global-merge","Merge global variables", false, false) bool GlobalMerge | |
Variables | |
static cl::opt< bool > | EnableGlobalMerge ("enable-global-merge", cl::Hidden, cl::desc("Enable global merge pass"), cl::init(true)) |
static cl::opt< bool > | EnableGlobalMergeOnConst ("global-merge-on-const", cl::Hidden, cl::desc("Enable global merge pass on constants"), cl::init(false)) |
static cl::opt< bool > | EnableGlobalMergeOnExternal ("global-merge-on-external", cl::Hidden, cl::desc("Enable global merge pass on external linkage"), cl::init(false)) |
#define DEBUG_TYPE "global-merge" |
Definition at line 74 of file GlobalMerge.cpp.
INITIALIZE_TM_PASS | ( | GlobalMerge | , |
"global-merge" | , | ||
"Merge global variables" | , | ||
false | , | ||
false | |||
) |
Definition at line 141 of file GlobalMerge.cpp.
References llvm::GlobalAlias::create(), llvm::GlobalValue::ExternalLinkage, llvm::ConstantInt::get(), llvm::StructType::get(), llvm::ConstantStruct::get(), llvm::TargetLoweringBase::getDataLayout(), llvm::ConstantExpr::getInBoundsGetElementPtr(), llvm::Type::getInt32Ty(), llvm::GlobalValue::getLinkage(), llvm::TargetLoweringBase::getMaximalGlobalOffset(), llvm::Value::getName(), llvm::GlobalValue::getType(), llvm::Value::getType(), llvm::DataLayout::getTypeAllocSize(), llvm::GlobalValue::InternalLinkage, Name, llvm::GlobalValue::NotThreadLocal, and llvm::SystemZISD::TM.
cl::opt<bool> EnableGlobalMerge("enable-global-merge", cl::Hidden, cl::desc("Enable global merge pass"), cl::init(true)) [static] |
cl::opt<bool> EnableGlobalMergeOnConst("global-merge-on-const", cl::Hidden, cl::desc("Enable global merge pass on constants"), cl::init(false)) [static] |