LLVM 20.0.0git
Macros | Functions | Variables
GlobalMerge.cpp File Reference
#include "llvm/CodeGen/GlobalMerge.h"
#include "llvm/ADT/BitVector.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/MapVector.h"
#include "llvm/ADT/SetVector.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Twine.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/GlobalAlias.h"
#include "llvm/IR/GlobalValue.h"
#include "llvm/IR/GlobalVariable.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Type.h"
#include "llvm/IR/Use.h"
#include "llvm/IR/User.h"
#include "llvm/InitializePasses.h"
#include "llvm/MC/SectionKind.h"
#include "llvm/Pass.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetLoweringObjectFile.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/TargetParser/Triple.h"
#include <algorithm>
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <string>
#include <vector>

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "global-merge"
 

Functions

 STATISTIC (NumMerged, "Number of globals merged")
 

Variables

static cl::opt< boolEnableGlobalMerge ("enable-global-merge", cl::Hidden, cl::desc("Enable the global merge pass"), cl::init(true))
 
static cl::opt< unsignedGlobalMergeMaxOffset ("global-merge-max-offset", cl::Hidden, cl::desc("Set maximum offset for global merge pass"), cl::init(0))
 
static cl::opt< boolGlobalMergeGroupByUse ("global-merge-group-by-use", cl::Hidden, cl::desc("Improve global merge pass to look at uses"), cl::init(true))
 
static cl::opt< boolGlobalMergeIgnoreSingleUse ("global-merge-ignore-single-use", cl::Hidden, cl::desc("Improve global merge pass to ignore globals only used alone"), cl::init(true))
 
static cl::opt< boolEnableGlobalMergeOnConst ("global-merge-on-const", cl::Hidden, cl::desc("Enable global merge pass on constants"), cl::init(false))
 
static cl::opt< cl::boolOrDefaultEnableGlobalMergeOnExternal ("global-merge-on-external", cl::Hidden, cl::desc("Enable global merge pass on external linkage"))
 
static cl::opt< unsignedGlobalMergeMinDataSize ("global-merge-min-data-size", cl::desc("The minimum size in bytes of each global " "that should considered in merging."), cl::init(0), cl::Hidden)
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "global-merge"

Definition at line 105 of file GlobalMerge.cpp.

Function Documentation

◆ STATISTIC()

STATISTIC ( NumMerged  ,
"Number of globals merged"   
)

Variable Documentation

◆ EnableGlobalMerge

cl::opt< bool > EnableGlobalMerge("enable-global-merge", cl::Hidden, cl::desc("Enable the global merge pass"), cl::init(true)) ( "enable-global-merge"  ,
cl::Hidden  ,
cl::desc("Enable the global merge pass")  ,
cl::init(true  
)
static

◆ EnableGlobalMergeOnConst

cl::opt< bool > EnableGlobalMergeOnConst("global-merge-on-const", cl::Hidden, cl::desc("Enable global merge pass on constants"), cl::init(false)) ( "global-merge-on-const"  ,
cl::Hidden  ,
cl::desc("Enable global merge pass on constants")  ,
cl::init(false)   
)
static

◆ EnableGlobalMergeOnExternal

cl::opt< cl::boolOrDefault > EnableGlobalMergeOnExternal("global-merge-on-external", cl::Hidden, cl::desc("Enable global merge pass on external linkage")) ( "global-merge-on-external"  ,
cl::Hidden  ,
cl::desc("Enable global merge pass on external linkage")   
)
static

◆ GlobalMergeGroupByUse

cl::opt< bool > GlobalMergeGroupByUse("global-merge-group-by-use", cl::Hidden, cl::desc("Improve global merge pass to look at uses"), cl::init(true)) ( "global-merge-group-by-use"  ,
cl::Hidden  ,
cl::desc("Improve global merge pass to look at uses")  ,
cl::init(true  
)
static

◆ GlobalMergeIgnoreSingleUse

cl::opt< bool > GlobalMergeIgnoreSingleUse("global-merge-ignore-single-use", cl::Hidden, cl::desc("Improve global merge pass to ignore globals only used alone"), cl::init(true)) ( "global-merge-ignore-single-use"  ,
cl::Hidden  ,
cl::desc("Improve global merge pass to ignore globals only used alone")  ,
cl::init(true  
)
static

◆ GlobalMergeMaxOffset

cl::opt< unsigned > GlobalMergeMaxOffset("global-merge-max-offset", cl::Hidden, cl::desc("Set maximum offset for global merge pass"), cl::init(0)) ( "global-merge-max-offset"  ,
cl::Hidden  ,
cl::desc("Set maximum offset for global merge pass")  ,
cl::init(0)   
)
static

◆ GlobalMergeMinDataSize

cl::opt< unsigned > GlobalMergeMinDataSize("global-merge-min-data-size", cl::desc("The minimum size in bytes of each global " "that should considered in merging."), cl::init(0), cl::Hidden) ( "global-merge-min-data-size"  ,
cl::desc("The minimum size in bytes of each global " "that should considered in merging.")  ,
cl::init(0)  ,
cl::Hidden   
)
static