LLVM 20.0.0git
Public Member Functions | Static 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]

Public Member Functions

 ObjectSizeOffsetEvaluator (const DataLayout &DL, const TargetLibraryInfo *TLI, LLVMContext &Context, ObjectSizeOpts EvalOpts={})
 
SizeOffsetValue compute (Value *V)
 
SizeOffsetValue visitAllocaInst (AllocaInst &I)
 
SizeOffsetValue visitCallBase (CallBase &CB)
 
SizeOffsetValue visitExtractElementInst (ExtractElementInst &I)
 
SizeOffsetValue visitExtractValueInst (ExtractValueInst &I)
 
SizeOffsetValue visitGEPOperator (GEPOperator &GEP)
 
SizeOffsetValue visitIntToPtrInst (IntToPtrInst &)
 
SizeOffsetValue visitLoadInst (LoadInst &I)
 
SizeOffsetValue visitPHINode (PHINode &PHI)
 
SizeOffsetValue visitSelectInst (SelectInst &I)
 
SizeOffsetValue visitInstruction (Instruction &I)
 
- Public Member Functions inherited from llvm::InstVisitor< ObjectSizeOffsetEvaluator, SizeOffsetValue >
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)
 
SizeOffsetValue visit (Instruction *I)
 
SizeOffsetValue visit (Instruction &I)
 
void visitModule (Module &M)
 
void visitFunction (Function &F)
 
void visitBasicBlock (BasicBlock &BB)
 
SizeOffsetValue visitICmpInst (ICmpInst &I)
 
SizeOffsetValue visitFCmpInst (FCmpInst &I)
 
SizeOffsetValue visitAllocaInst (AllocaInst &I)
 
SizeOffsetValue visitLoadInst (LoadInst &I)
 
SizeOffsetValue visitStoreInst (StoreInst &I)
 
SizeOffsetValue visitAtomicCmpXchgInst (AtomicCmpXchgInst &I)
 
SizeOffsetValue visitAtomicRMWInst (AtomicRMWInst &I)
 
SizeOffsetValue visitFenceInst (FenceInst &I)
 
SizeOffsetValue visitGetElementPtrInst (GetElementPtrInst &I)
 
SizeOffsetValue visitPHINode (PHINode &I)
 
SizeOffsetValue visitTruncInst (TruncInst &I)
 
SizeOffsetValue visitZExtInst (ZExtInst &I)
 
SizeOffsetValue visitSExtInst (SExtInst &I)
 
SizeOffsetValue visitFPTruncInst (FPTruncInst &I)
 
SizeOffsetValue visitFPExtInst (FPExtInst &I)
 
SizeOffsetValue visitFPToUIInst (FPToUIInst &I)
 
SizeOffsetValue visitFPToSIInst (FPToSIInst &I)
 
SizeOffsetValue visitUIToFPInst (UIToFPInst &I)
 
SizeOffsetValue visitSIToFPInst (SIToFPInst &I)
 
SizeOffsetValue visitPtrToIntInst (PtrToIntInst &I)
 
SizeOffsetValue visitIntToPtrInst (IntToPtrInst &I)
 
SizeOffsetValue visitBitCastInst (BitCastInst &I)
 
SizeOffsetValue visitAddrSpaceCastInst (AddrSpaceCastInst &I)
 
SizeOffsetValue visitSelectInst (SelectInst &I)
 
SizeOffsetValue visitVAArgInst (VAArgInst &I)
 
SizeOffsetValue visitExtractElementInst (ExtractElementInst &I)
 
SizeOffsetValue visitInsertElementInst (InsertElementInst &I)
 
SizeOffsetValue visitShuffleVectorInst (ShuffleVectorInst &I)
 
SizeOffsetValue visitExtractValueInst (ExtractValueInst &I)
 
SizeOffsetValue visitInsertValueInst (InsertValueInst &I)
 
SizeOffsetValue visitLandingPadInst (LandingPadInst &I)
 
SizeOffsetValue visitFuncletPadInst (FuncletPadInst &I)
 
SizeOffsetValue visitCleanupPadInst (CleanupPadInst &I)
 
SizeOffsetValue visitCatchPadInst (CatchPadInst &I)
 
SizeOffsetValue visitFreezeInst (FreezeInst &I)
 
SizeOffsetValue visitDbgDeclareInst (DbgDeclareInst &I)
 
SizeOffsetValue visitDbgValueInst (DbgValueInst &I)
 
SizeOffsetValue visitDbgVariableIntrinsic (DbgVariableIntrinsic &I)
 
SizeOffsetValue visitDbgLabelInst (DbgLabelInst &I)
 
SizeOffsetValue visitDbgInfoIntrinsic (DbgInfoIntrinsic &I)
 
SizeOffsetValue visitMemSetInst (MemSetInst &I)
 
SizeOffsetValue visitMemSetInlineInst (MemSetInlineInst &I)
 
SizeOffsetValue visitMemSetPatternInst (MemSetPatternInst &I)
 
SizeOffsetValue visitMemCpyInst (MemCpyInst &I)
 
SizeOffsetValue visitMemCpyInlineInst (MemCpyInlineInst &I)
 
SizeOffsetValue visitMemMoveInst (MemMoveInst &I)
 
SizeOffsetValue visitMemTransferInst (MemTransferInst &I)
 
SizeOffsetValue visitMemIntrinsic (MemIntrinsic &I)
 
SizeOffsetValue visitVAStartInst (VAStartInst &I)
 
SizeOffsetValue visitVAEndInst (VAEndInst &I)
 
SizeOffsetValue visitVACopyInst (VACopyInst &I)
 
SizeOffsetValue visitIntrinsicInst (IntrinsicInst &I)
 
SizeOffsetValue visitCallInst (CallInst &I)
 
SizeOffsetValue visitInvokeInst (InvokeInst &I)
 
SizeOffsetValue visitCallBrInst (CallBrInst &I)
 
SizeOffsetValue visitReturnInst (ReturnInst &I)
 
SizeOffsetValue visitBranchInst (BranchInst &I)
 
SizeOffsetValue visitSwitchInst (SwitchInst &I)
 
SizeOffsetValue visitIndirectBrInst (IndirectBrInst &I)
 
SizeOffsetValue visitResumeInst (ResumeInst &I)
 
SizeOffsetValue visitUnreachableInst (UnreachableInst &I)
 
SizeOffsetValue visitCleanupReturnInst (CleanupReturnInst &I)
 
SizeOffsetValue visitCatchReturnInst (CatchReturnInst &I)
 
SizeOffsetValue visitCatchSwitchInst (CatchSwitchInst &I)
 
SizeOffsetValue visitTerminator (Instruction &I)
 
SizeOffsetValue visitCastInst (CastInst &I)
 
SizeOffsetValue visitUnaryOperator (UnaryOperator &I)
 
SizeOffsetValue visitBinaryOperator (BinaryOperator &I)
 
SizeOffsetValue visitCmpInst (CmpInst &I)
 
SizeOffsetValue visitUnaryInstruction (UnaryInstruction &I)
 
SizeOffsetValue visitCallBase (CallBase &I)
 
void visitInstruction (Instruction &I)
 

Static Public Member Functions

static SizeOffsetValue unknown ()
 

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 327 of file MemoryBuiltins.h.

Constructor & Destructor Documentation

◆ ObjectSizeOffsetEvaluator()

ObjectSizeOffsetEvaluator::ObjectSizeOffsetEvaluator ( const DataLayout DL,
const TargetLibraryInfo TLI,
LLVMContext Context,
ObjectSizeOpts  EvalOpts = {} 
)

Definition at line 1174 of file MemoryBuiltins.cpp.

References I.

Member Function Documentation

◆ compute()

SizeOffsetValue ObjectSizeOffsetEvaluator::compute ( Value V)

◆ unknown()

static SizeOffsetValue llvm::ObjectSizeOffsetEvaluator::unknown ( )
inlinestatic

◆ visitAllocaInst()

SizeOffsetValue ObjectSizeOffsetEvaluator::visitAllocaInst ( AllocaInst I)

◆ visitCallBase()

SizeOffsetValue ObjectSizeOffsetEvaluator::visitCallBase ( CallBase CB)

◆ visitExtractElementInst()

SizeOffsetValue ObjectSizeOffsetEvaluator::visitExtractElementInst ( ExtractElementInst I)

Definition at line 1317 of file MemoryBuiltins.cpp.

References unknown().

◆ visitExtractValueInst()

SizeOffsetValue ObjectSizeOffsetEvaluator::visitExtractValueInst ( ExtractValueInst I)

Definition at line 1322 of file MemoryBuiltins.cpp.

References unknown().

◆ visitGEPOperator()

SizeOffsetValue ObjectSizeOffsetEvaluator::visitGEPOperator ( GEPOperator GEP)

◆ visitInstruction()

SizeOffsetValue ObjectSizeOffsetEvaluator::visitInstruction ( Instruction I)

Definition at line 1404 of file MemoryBuiltins.cpp.

References llvm::dbgs(), I, LLVM_DEBUG, and unknown().

◆ visitIntToPtrInst()

SizeOffsetValue ObjectSizeOffsetEvaluator::visitIntToPtrInst ( IntToPtrInst )

Definition at line 1336 of file MemoryBuiltins.cpp.

References unknown().

◆ visitLoadInst()

SizeOffsetValue ObjectSizeOffsetEvaluator::visitLoadInst ( LoadInst I)

Definition at line 1341 of file MemoryBuiltins.cpp.

References unknown().

◆ visitPHINode()

SizeOffsetValue ObjectSizeOffsetEvaluator::visitPHINode ( PHINode PHI)

◆ visitSelectInst()

SizeOffsetValue ObjectSizeOffsetEvaluator::visitSelectInst ( SelectInst I)

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