LLVM: lib/Transforms/IPO/ConstantMerge.cpp File Reference (original) (raw)
Go to the source code of this file.
| Macros | |
|---|---|
| #define | DEBUG_TYPE "constmerge" |
| Enumerations | |
|---|---|
| enum class | CanMerge { No, Yes } |
| Functions | |
|---|---|
| STATISTIC (NumIdenticalMerged, "Number of identical global constants merged") | |
| 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) |
| static bool | hasMetadataOtherThanDebugLoc (const GlobalVariable *GV) |
| static void | copyDebugLocMetadata (const GlobalVariable *From, GlobalVariable *To) |
| static Align | getAlign (GlobalVariable *GV) |
| static bool | isUnmergeableGlobal (GlobalVariable *GV, const SmallPtrSetImpl< const GlobalValue * > &UsedGlobals) |
| static CanMerge | makeMergeable (GlobalVariable *Old, GlobalVariable *New) |
| static void | replace (Module &M, GlobalVariable *Old, GlobalVariable *New) |
| static bool | mergeConstants (Module &M) |
◆ DEBUG_TYPE
#define DEBUG_TYPE "constmerge"
◆ CanMerge
◆ copyDebugLocMetadata()
◆ FindUsedValues()
◆ getAlign()
◆ hasMetadataOtherThanDebugLoc()
◆ IsBetterCanonical()
◆ isUnmergeableGlobal()
◆ makeMergeable()
◆ mergeConstants()
Definition at line 134 of file ConstantMerge.cpp.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::clear(), llvm::dbgs(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find(), FindUsedValues(), hasMetadataOtherThanDebugLoc(), IsBetterCanonical(), isUnmergeableGlobal(), LLVM_DEBUG, llvm::make_early_inc_range(), makeMergeable(), No, llvm::SmallVectorTemplateBase< T, bool >::push_back(), and llvm::replace().
Referenced by llvm::ConstantMergePass::run().
◆ replace()
◆ STATISTIC()
| STATISTIC | ( | NumIdenticalMerged | , |
|---|---|---|---|
| "Number of identical global constants merged" | ) |