class GlobalDCEPass

Declaration

class GlobalDCEPass : public PassInfoMixin { /* full declaration omitted */ };

Description

Pass to remove unused function declarations.

Declared at: llvm/include/llvm/Transforms/IPO/GlobalDCE.h:36

Inherits from: PassInfoMixin

Member Variables

private SmallPtrSet<llvm::GlobalValue*, 32> AliveGlobals
private DenseMap<llvm::GlobalValue*, SmallPtrSet<llvm::GlobalValue*, 4>> GVDependencies
Global -> Global that uses this global.
private std::unordered_map<Constant*, SmallPtrSet<GlobalValue*, 8>> ConstantDependenciesCache
Constant -> Globals that use this global cache.
private std::unordered_multimap<Comdat*, GlobalValue*> ComdatMembers
Comdat -> Globals in that Comdat section.
private DenseMap< llvm::Metadata*, SmallSet<std::pair<GlobalVariable*, uint64_t>, 4>> TypeIdMap
!type metadata -> set of (vtable, offset) pairs
private SmallPtrSet<llvm::GlobalValue*, 32> VFESafeVTables

Method Overview

Methods

void AddVirtualFunctionDependencies(
    llvm::Module& M)

Declared at: llvm/include/llvm/Transforms/IPO/GlobalDCE.h:67

Parameters

llvm::Module& M

void ComputeDependencies(
    llvm::Value* V,
    SmallPtrSetImpl<llvm::GlobalValue*>& U)

Declared at: llvm/include/llvm/Transforms/IPO/GlobalDCE.h:72

Parameters

llvm::Value* V
SmallPtrSetImpl<llvm::GlobalValue*>& U

void MarkLive(llvm::GlobalValue& GV,
              SmallVectorImpl<llvm::GlobalValue*>*
                  Updates = nullptr)

Declared at: llvm/include/llvm/Transforms/IPO/GlobalDCE.h:62

Parameters

llvm::GlobalValue& GV
SmallVectorImpl<llvm::GlobalValue*>* Updates = nullptr

bool RemoveUnusedGlobalValue(
    llvm::GlobalValue& GV)

Declared at: llvm/include/llvm/Transforms/IPO/GlobalDCE.h:64

Parameters

llvm::GlobalValue& GV

void ScanTypeCheckedLoadIntrinsics(
    llvm::Module& M)

Declared at: llvm/include/llvm/Transforms/IPO/GlobalDCE.h:69

Parameters

llvm::Module& M

void ScanVTableLoad(llvm::Function* Caller,
                    llvm::Metadata* TypeId,
                    uint64_t CallOffset)

Declared at: llvm/include/llvm/Transforms/IPO/GlobalDCE.h:70

Parameters

llvm::Function* Caller
llvm::Metadata* TypeId
uint64_t CallOffset

void ScanVTables(llvm::Module& M)

Declared at: llvm/include/llvm/Transforms/IPO/GlobalDCE.h:68

Parameters

llvm::Module& M

void UpdateGVDependencies(llvm::GlobalValue& GV)

Declared at: llvm/include/llvm/Transforms/IPO/GlobalDCE.h:61

Parameters

llvm::GlobalValue& GV

llvm::PreservedAnalyses run(
    llvm::Module& M,
    llvm::ModuleAnalysisManager&)

Declared at: llvm/include/llvm/Transforms/IPO/GlobalDCE.h:38

Parameters

llvm::Module& M
llvm::ModuleAnalysisManager&