LLVM 20.0.0git
Public Member Functions | List of all members
llvm::ObjectSizeOffsetVisitor Class Reference

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

#include "llvm/Analysis/MemoryBuiltins.h"

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

Public Member Functions

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

Constructor & Destructor Documentation

◆ ObjectSizeOffsetVisitor()

ObjectSizeOffsetVisitor::ObjectSizeOffsetVisitor ( const DataLayout DL,
const TargetLibraryInfo TLI,
LLVMContext Context,
ObjectSizeOpts  Options = {} 
)

Definition at line 742 of file MemoryBuiltins.cpp.

Member Function Documentation

◆ compute()

SizeOffsetAPInt ObjectSizeOffsetVisitor::compute ( Value V)

◆ visitAllocaInst()

OffsetSpan ObjectSizeOffsetVisitor::visitAllocaInst ( AllocaInst I)

◆ visitArgument()

OffsetSpan ObjectSizeOffsetVisitor::visitArgument ( Argument A)

◆ visitCallBase()

OffsetSpan ObjectSizeOffsetVisitor::visitCallBase ( CallBase CB)

◆ visitConstantPointerNull()

OffsetSpan ObjectSizeOffsetVisitor::visitConstantPointerNull ( ConstantPointerNull CPN)

◆ visitExtractElementInst()

OffsetSpan ObjectSizeOffsetVisitor::visitExtractElementInst ( ExtractElementInst I)

Definition at line 963 of file MemoryBuiltins.cpp.

◆ visitExtractValueInst()

OffsetSpan ObjectSizeOffsetVisitor::visitExtractValueInst ( ExtractValueInst I)

Definition at line 967 of file MemoryBuiltins.cpp.

◆ visitGlobalAlias()

OffsetSpan ObjectSizeOffsetVisitor::visitGlobalAlias ( GlobalAlias GA)

◆ visitGlobalVariable()

OffsetSpan ObjectSizeOffsetVisitor::visitGlobalVariable ( GlobalVariable GV)

◆ visitInstruction()

OffsetSpan ObjectSizeOffsetVisitor::visitInstruction ( Instruction I)

Definition at line 1164 of file MemoryBuiltins.cpp.

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

◆ visitIntToPtrInst()

OffsetSpan ObjectSizeOffsetVisitor::visitIntToPtrInst ( IntToPtrInst )

Definition at line 988 of file MemoryBuiltins.cpp.

◆ visitLoadInst()

OffsetSpan ObjectSizeOffsetVisitor::visitLoadInst ( LoadInst I)

◆ visitPHINode()

OffsetSpan ObjectSizeOffsetVisitor::visitPHINode ( PHINode PN)

◆ visitSelectInst()

OffsetSpan ObjectSizeOffsetVisitor::visitSelectInst ( SelectInst I)

Definition at line 1155 of file MemoryBuiltins.cpp.

References I.

◆ visitUndefValue()

OffsetSpan ObjectSizeOffsetVisitor::visitUndefValue ( UndefValue )

Definition at line 1160 of file MemoryBuiltins.cpp.


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