LLVM 19.0.0git
Public Attributes | List of all members
llvm::GlobalMergeOptions Struct Reference

#include "llvm/CodeGen/GlobalMerge.h"

Public Attributes

unsigned MaxOffset = 0
 
bool GroupByUse = true
 
bool IgnoreSingleUse = true
 
bool MergeConst = false
 
bool MergeExternal = true
 Whether we should merge global variables that have external linkage.
 
bool SizeOnly = false
 Whether we should try to optimize for size only.
 

Detailed Description

Definition at line 18 of file GlobalMerge.h.

Member Data Documentation

◆ GroupByUse

bool llvm::GlobalMergeOptions::GroupByUse = true

Definition at line 24 of file GlobalMerge.h.

◆ IgnoreSingleUse

bool llvm::GlobalMergeOptions::IgnoreSingleUse = true

Definition at line 25 of file GlobalMerge.h.

◆ MaxOffset

unsigned llvm::GlobalMergeOptions::MaxOffset = 0

Definition at line 23 of file GlobalMerge.h.

◆ MergeConst

bool llvm::GlobalMergeOptions::MergeConst = false

Definition at line 26 of file GlobalMerge.h.

◆ MergeExternal

bool llvm::GlobalMergeOptions::MergeExternal = true

Whether we should merge global variables that have external linkage.

Definition at line 28 of file GlobalMerge.h.

◆ SizeOnly

bool llvm::GlobalMergeOptions::SizeOnly = false

Whether we should try to optimize for size only.

Currently, this applies a dead simple heuristic: only consider globals used in minsize functions for merging. FIXME: This could learn about optsize, and be used in the cost model.

Definition at line 33 of file GlobalMerge.h.


The documentation for this struct was generated from the following file: