LLVM  6.0.0svn
Public Member Functions | List of all members
llvm::ObjectSizeOffsetEvaluator Class Reference

Evaluate the size and offset of an object pointed to by a Value*. More...

#include "llvm/Analysis/MemoryBuiltins.h"

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

Public Member Functions

 ObjectSizeOffsetEvaluator (const DataLayout &DL, const TargetLibraryInfo *TLI, LLVMContext &Context, bool RoundToAlign=false)
 
SizeOffsetEvalType compute (Value *V)
 
bool knownSize (SizeOffsetEvalType SizeOffset)
 
bool knownOffset (SizeOffsetEvalType SizeOffset)
 
bool anyKnown (SizeOffsetEvalType SizeOffset)
 
bool bothKnown (SizeOffsetEvalType SizeOffset)
 
SizeOffsetEvalType visitAllocaInst (AllocaInst &I)
 
SizeOffsetEvalType visitCallSite (CallSite CS)
 
SizeOffsetEvalType visitExtractElementInst (ExtractElementInst &I)
 
SizeOffsetEvalType visitExtractValueInst (ExtractValueInst &I)
 
SizeOffsetEvalType visitGEPOperator (GEPOperator &GEP)
 
SizeOffsetEvalType visitIntToPtrInst (IntToPtrInst &)
 
SizeOffsetEvalType visitLoadInst (LoadInst &I)
 
SizeOffsetEvalType visitPHINode (PHINode &PHI)
 
SizeOffsetEvalType visitSelectInst (SelectInst &I)
 
SizeOffsetEvalType visitInstruction (Instruction &I)
 
- Public Member Functions inherited from llvm::InstVisitor< ObjectSizeOffsetEvaluator, SizeOffsetEvalType >
void visit (Iterator Start, Iterator End)
 
void visit (Module &M)
 
void visit (Function &F)
 
void visit (BasicBlock &BB)
 
void visit (Module *M)
 
void visit (Function *F)
 
void visit (BasicBlock *BB)
 
SizeOffsetEvalType visit (Instruction *I)
 
SizeOffsetEvalType visit (Instruction &I)
 
void visitModule (Module &M)
 
void visitFunction (Function &F)
 
void visitBasicBlock (BasicBlock &BB)
 
SizeOffsetEvalType visitReturnInst (ReturnInst &I)
 
SizeOffsetEvalType visitBranchInst (BranchInst &I)
 
SizeOffsetEvalType visitSwitchInst (SwitchInst &I)
 
SizeOffsetEvalType visitIndirectBrInst (IndirectBrInst &I)
 
SizeOffsetEvalType visitResumeInst (ResumeInst &I)
 
SizeOffsetEvalType visitUnreachableInst (UnreachableInst &I)
 
SizeOffsetEvalType visitCleanupReturnInst (CleanupReturnInst &I)
 
SizeOffsetEvalType visitCatchReturnInst (CatchReturnInst &I)
 
SizeOffsetEvalType visitCatchSwitchInst (CatchSwitchInst &I)
 
SizeOffsetEvalType visitICmpInst (ICmpInst &I)
 
SizeOffsetEvalType visitFCmpInst (FCmpInst &I)
 
SizeOffsetEvalType visitAllocaInst (AllocaInst &I)
 
SizeOffsetEvalType visitLoadInst (LoadInst &I)
 
SizeOffsetEvalType visitStoreInst (StoreInst &I)
 
SizeOffsetEvalType visitAtomicCmpXchgInst (AtomicCmpXchgInst &I)
 
SizeOffsetEvalType visitAtomicRMWInst (AtomicRMWInst &I)
 
SizeOffsetEvalType visitFenceInst (FenceInst &I)
 
SizeOffsetEvalType visitGetElementPtrInst (GetElementPtrInst &I)
 
SizeOffsetEvalType visitPHINode (PHINode &I)
 
SizeOffsetEvalType visitTruncInst (TruncInst &I)
 
SizeOffsetEvalType visitZExtInst (ZExtInst &I)
 
SizeOffsetEvalType visitSExtInst (SExtInst &I)
 
SizeOffsetEvalType visitFPTruncInst (FPTruncInst &I)
 
SizeOffsetEvalType visitFPExtInst (FPExtInst &I)
 
SizeOffsetEvalType visitFPToUIInst (FPToUIInst &I)
 
SizeOffsetEvalType visitFPToSIInst (FPToSIInst &I)
 
SizeOffsetEvalType visitUIToFPInst (UIToFPInst &I)
 
SizeOffsetEvalType visitSIToFPInst (SIToFPInst &I)
 
SizeOffsetEvalType visitPtrToIntInst (PtrToIntInst &I)
 
SizeOffsetEvalType visitIntToPtrInst (IntToPtrInst &I)
 
SizeOffsetEvalType visitBitCastInst (BitCastInst &I)
 
SizeOffsetEvalType visitAddrSpaceCastInst (AddrSpaceCastInst &I)
 
SizeOffsetEvalType visitSelectInst (SelectInst &I)
 
SizeOffsetEvalType visitVAArgInst (VAArgInst &I)
 
SizeOffsetEvalType visitExtractElementInst (ExtractElementInst &I)
 
SizeOffsetEvalType visitInsertElementInst (InsertElementInst &I)
 
SizeOffsetEvalType visitShuffleVectorInst (ShuffleVectorInst &I)
 
SizeOffsetEvalType visitExtractValueInst (ExtractValueInst &I)
 
SizeOffsetEvalType visitInsertValueInst (InsertValueInst &I)
 
SizeOffsetEvalType visitLandingPadInst (LandingPadInst &I)
 
SizeOffsetEvalType visitFuncletPadInst (FuncletPadInst &I)
 
SizeOffsetEvalType visitCleanupPadInst (CleanupPadInst &I)
 
SizeOffsetEvalType visitCatchPadInst (CatchPadInst &I)
 
SizeOffsetEvalType visitDbgDeclareInst (DbgDeclareInst &I)
 
SizeOffsetEvalType visitDbgValueInst (DbgValueInst &I)
 
SizeOffsetEvalType visitDbgInfoIntrinsic (DbgInfoIntrinsic &I)
 
SizeOffsetEvalType visitMemSetInst (MemSetInst &I)
 
SizeOffsetEvalType visitMemCpyInst (MemCpyInst &I)
 
SizeOffsetEvalType visitMemMoveInst (MemMoveInst &I)
 
SizeOffsetEvalType visitMemTransferInst (MemTransferInst &I)
 
SizeOffsetEvalType visitMemIntrinsic (MemIntrinsic &I)
 
SizeOffsetEvalType visitVAStartInst (VAStartInst &I)
 
SizeOffsetEvalType visitVAEndInst (VAEndInst &I)
 
SizeOffsetEvalType visitVACopyInst (VACopyInst &I)
 
SizeOffsetEvalType visitIntrinsicInst (IntrinsicInst &I)
 
SizeOffsetEvalType visitCallInst (CallInst &I)
 
SizeOffsetEvalType visitInvokeInst (InvokeInst &I)
 
SizeOffsetEvalType visitCastInst (CastInst &I)
 
SizeOffsetEvalType visitBinaryOperator (BinaryOperator &I)
 
SizeOffsetEvalType visitCmpInst (CmpInst &I)
 
SizeOffsetEvalType visitTerminatorInst (TerminatorInst &I)
 
SizeOffsetEvalType visitUnaryInstruction (UnaryInstruction &I)
 
SizeOffsetEvalType visitCallSite (CallSite CS)
 
void visitInstruction (Instruction &I)
 

Detailed Description

Evaluate the size and offset of an object pointed to by a Value*.

May create code to compute the result at run-time.

Definition at line 253 of file MemoryBuiltins.h.

Constructor & Destructor Documentation

◆ ObjectSizeOffsetEvaluator()

ObjectSizeOffsetEvaluator::ObjectSizeOffsetEvaluator ( const DataLayout DL,
const TargetLibraryInfo TLI,
LLVMContext Context,
bool  RoundToAlign = false 
)

Definition at line 721 of file MemoryBuiltins.cpp.

Member Function Documentation

◆ anyKnown()

bool llvm::ObjectSizeOffsetEvaluator::anyKnown ( SizeOffsetEvalType  SizeOffset)
inline

Definition at line 290 of file MemoryBuiltins.h.

Referenced by compute().

◆ bothKnown()

bool llvm::ObjectSizeOffsetEvaluator::bothKnown ( SizeOffsetEvalType  SizeOffset)
inline

Definition at line 294 of file MemoryBuiltins.h.

References GEP.

Referenced by compute(), instrumentMemAccess(), visitGEPOperator(), visitPHINode(), and visitSelectInst().

◆ compute()

SizeOffsetEvalType ObjectSizeOffsetEvaluator::compute ( Value V)

◆ knownOffset()

bool llvm::ObjectSizeOffsetEvaluator::knownOffset ( SizeOffsetEvalType  SizeOffset)
inline

Definition at line 286 of file MemoryBuiltins.h.

◆ knownSize()

bool llvm::ObjectSizeOffsetEvaluator::knownSize ( SizeOffsetEvalType  SizeOffset)
inline

Definition at line 282 of file MemoryBuiltins.h.

◆ visitAllocaInst()

SizeOffsetEvalType ObjectSizeOffsetEvaluator::visitAllocaInst ( AllocaInst I)

◆ visitCallSite()

SizeOffsetEvalType ObjectSizeOffsetEvaluator::visitCallSite ( CallSite  CS)

◆ visitExtractElementInst()

SizeOffsetEvalType ObjectSizeOffsetEvaluator::visitExtractElementInst ( ExtractElementInst I)

Definition at line 850 of file MemoryBuiltins.cpp.

◆ visitExtractValueInst()

SizeOffsetEvalType ObjectSizeOffsetEvaluator::visitExtractValueInst ( ExtractValueInst I)

Definition at line 855 of file MemoryBuiltins.cpp.

◆ visitGEPOperator()

SizeOffsetEvalType ObjectSizeOffsetEvaluator::visitGEPOperator ( GEPOperator GEP)

◆ visitInstruction()

SizeOffsetEvalType ObjectSizeOffsetEvaluator::visitInstruction ( Instruction I)

Definition at line 933 of file MemoryBuiltins.cpp.

References llvm::dbgs(), and DEBUG.

◆ visitIntToPtrInst()

SizeOffsetEvalType ObjectSizeOffsetEvaluator::visitIntToPtrInst ( IntToPtrInst )

Definition at line 870 of file MemoryBuiltins.cpp.

◆ visitLoadInst()

SizeOffsetEvalType ObjectSizeOffsetEvaluator::visitLoadInst ( LoadInst I)

Definition at line 875 of file MemoryBuiltins.cpp.

◆ visitPHINode()

SizeOffsetEvalType ObjectSizeOffsetEvaluator::visitPHINode ( PHINode PHI)

◆ visitSelectInst()

SizeOffsetEvalType ObjectSizeOffsetEvaluator::visitSelectInst ( SelectInst I)

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