LLVM API Documentation

Public Member Functions
llvm::ObjectSizeOffsetVisitor Class Reference

Evaluate the size and offset of an object pointed to by a Value* statically. Fails if size or offset are not known at compile time. More...

#include <MemoryBuiltins.h>

Inheritance diagram for llvm::ObjectSizeOffsetVisitor:
Inheritance graph
[legend]
Collaboration diagram for llvm::ObjectSizeOffsetVisitor:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ObjectSizeOffsetVisitor (const DataLayout *DL, const TargetLibraryInfo *TLI, LLVMContext &Context, bool RoundToAlign=false)
SizeOffsetType compute (Value *V)
bool knownSize (SizeOffsetType &SizeOffset)
bool knownOffset (SizeOffsetType &SizeOffset)
bool bothKnown (SizeOffsetType &SizeOffset)
SizeOffsetType visitAllocaInst (AllocaInst &I)
SizeOffsetType visitArgument (Argument &A)
SizeOffsetType visitCallSite (CallSite CS)
SizeOffsetType visitConstantPointerNull (ConstantPointerNull &)
SizeOffsetType visitExtractElementInst (ExtractElementInst &I)
SizeOffsetType visitExtractValueInst (ExtractValueInst &I)
SizeOffsetType visitGEPOperator (GEPOperator &GEP)
SizeOffsetType visitGlobalAlias (GlobalAlias &GA)
SizeOffsetType visitGlobalVariable (GlobalVariable &GV)
SizeOffsetType visitIntToPtrInst (IntToPtrInst &)
SizeOffsetType visitLoadInst (LoadInst &I)
SizeOffsetType visitPHINode (PHINode &)
SizeOffsetType visitSelectInst (SelectInst &I)
SizeOffsetType visitUndefValue (UndefValue &)
SizeOffsetType visitInstruction (Instruction &I)

Detailed Description

Evaluate the size and offset of an object pointed to by a Value* statically. Fails if size or offset are not known at compile time.

Definition at line 159 of file MemoryBuiltins.h.


Constructor & Destructor Documentation

Definition at line 397 of file MemoryBuiltins.cpp.


Member Function Documentation

Definition at line 189 of file MemoryBuiltins.h.

References knownOffset(), and knownSize().

Referenced by visitGEPOperator(), and visitSelectInst().

Definition at line 185 of file MemoryBuiltins.h.

Referenced by bothKnown().

Definition at line 181 of file MemoryBuiltins.h.

Referenced by bothKnown().

Definition at line 521 of file MemoryBuiltins.cpp.

Referenced by compute().

Reimplemented from llvm::InstVisitor< ObjectSizeOffsetVisitor, SizeOffsetType >.

Definition at line 586 of file MemoryBuiltins.cpp.

References llvm::dbgs(), and DEBUG.

Definition at line 582 of file MemoryBuiltins.cpp.

Referenced by compute().


The documentation for this class was generated from the following files: