LLVM  mainline
Public Member Functions
llvm::ObjectSizeOffsetVisitor Class Reference

Evaluate the size and offset of an object pointed to by a Value* statically. 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 150 of file MemoryBuiltins.h.


Constructor & Destructor Documentation

Definition at line 382 of file MemoryBuiltins.cpp.


Member Function Documentation

Definition at line 180 of file MemoryBuiltins.h.

References knownOffset(), and knownSize().

Referenced by visitGEPOperator(), and visitSelectInst().

Definition at line 176 of file MemoryBuiltins.h.

Referenced by bothKnown().

Definition at line 172 of file MemoryBuiltins.h.

Referenced by bothKnown().

Definition at line 506 of file MemoryBuiltins.cpp.

Referenced by compute().

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

Definition at line 571 of file MemoryBuiltins.cpp.

References llvm::dbgs(), and DEBUG.

Definition at line 567 of file MemoryBuiltins.cpp.

Referenced by compute().


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