LLVM 20.0.0git
|
Various options to control the behavior of getObjectSize. More...
#include "llvm/Analysis/MemoryBuiltins.h"
Public Types | |
enum class | Mode : uint8_t { ExactSizeFromOffset , ExactUnderlyingSizeAndOffset , Min , Max } |
Controls how we handle conditional statements with unknown conditions. More... | |
Public Attributes | |
Mode | EvalMode = Mode::ExactSizeFromOffset |
How we want to evaluate this object's size. | |
bool | RoundToAlign = false |
Whether to round the result up to the alignment of allocas, byval arguments, and global variables. | |
bool | NullIsUnknownSize = false |
If this is true, null pointers in address space 0 will be treated as though they can't be evaluated. | |
AAResults * | AA = nullptr |
If set, used for more accurate evaluation. | |
Various options to control the behavior of getObjectSize.
Definition at line 138 of file MemoryBuiltins.h.
|
strong |
Controls how we handle conditional statements with unknown conditions.
Definition at line 140 of file MemoryBuiltins.h.
AAResults* llvm::ObjectSizeOpts::AA = nullptr |
If set, used for more accurate evaluation.
Definition at line 164 of file MemoryBuiltins.h.
Referenced by llvm::lowerObjectSizeCall(), and llvm::ObjectSizeOffsetVisitor::visitLoadInst().
Mode llvm::ObjectSizeOpts::EvalMode = Mode::ExactSizeFromOffset |
How we want to evaluate this object's size.
Definition at line 155 of file MemoryBuiltins.h.
Referenced by addBoundsChecking(), llvm::ObjectSizeOffsetVisitor::compute(), computePointerICmp(), llvm::lowerObjectSizeCall(), llvm::ObjectSizeOffsetVisitor::visitAllocaInst(), llvm::ObjectSizeOffsetVisitor::visitCallBase(), and llvm::ObjectSizeOffsetVisitor::visitGlobalVariable().
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 162 of file MemoryBuiltins.h.
Referenced by computePointerICmp(), getObjectSize(), getPointerSize(), isDereferenceableAndAlignedPointer(), llvm::lowerObjectSizeCall(), and llvm::ObjectSizeOffsetVisitor::visitConstantPointerNull().
bool llvm::ObjectSizeOpts::RoundToAlign = false |
Whether to round the result up to the alignment of allocas, byval arguments, and global variables.
Definition at line 158 of file MemoryBuiltins.h.
Referenced by addBoundsChecking(), getObjectSize(), and isDereferenceableAndAlignedPointer().