LLVM  6.0.0svn
Public Types | Public Attributes | List of all members
llvm::ObjectSizeOpts Struct Reference

Various options to control the behavior of getObjectSize. More...

#include "llvm/Analysis/MemoryBuiltins.h"

Collaboration diagram for llvm::ObjectSizeOpts:
Collaboration graph
[legend]

Public Types

enum  Mode : uint8_t { Mode::Exact, Mode::Min, Mode::Max }
 Controls how we handle conditional statements with unknown conditions. More...
 

Public Attributes

Mode EvalMode = Mode::Exact
 How we want to evaluate this object's size. More...
 
bool RoundToAlign = false
 Whether to round the result up to the alignment of allocas, byval arguments, and global variables. More...
 
bool NullIsUnknownSize = false
 If this is true, null pointers in address space 0 will be treated as though they can't be evaluated. More...
 

Detailed Description

Various options to control the behavior of getObjectSize.

Definition at line 150 of file MemoryBuiltins.h.

Member Enumeration Documentation

◆ Mode

enum llvm::ObjectSizeOpts::Mode : uint8_t
strong

Controls how we handle conditional statements with unknown conditions.

Enumerator
Exact 

Fail to evaluate an unknown condition.

Min 

Evaluate all branches of an unknown condition.

If all evaluations succeed, pick the minimum size.

Max 

Same as Min, except we pick the maximum size of all of the branches.

Definition at line 152 of file MemoryBuiltins.h.

Member Data Documentation

◆ EvalMode

Mode llvm::ObjectSizeOpts::EvalMode = Mode::Exact

How we want to evaluate this object's size.

Definition at line 163 of file MemoryBuiltins.h.

Referenced by llvm::lowerObjectSizeCall(), and llvm::ObjectSizeOffsetVisitor::visitSelectInst().

◆ NullIsUnknownSize

bool llvm::ObjectSizeOpts::NullIsUnknownSize = false

If this is true, null pointers in address space 0 will be treated as though they can't be evaluated.

Otherwise, null is always considered to point to a 0 byte region of memory.

Definition at line 170 of file MemoryBuiltins.h.

Referenced by llvm::lowerObjectSizeCall(), and llvm::ObjectSizeOffsetVisitor::visitConstantPointerNull().

◆ RoundToAlign

bool llvm::ObjectSizeOpts::RoundToAlign = false

Whether to round the result up to the alignment of allocas, byval arguments, and global variables.

Definition at line 166 of file MemoryBuiltins.h.

Referenced by llvm::ObjectSizeOffsetEvaluator::compute(), getObjectSize(), and instrumentMaskedLoadOrStore().


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