ΒΆbool isSafeToLoadUnconditionally(
    llvm::Value* V,
    llvm::MaybeAlign Alignment,
    llvm::APInt& Size,
    const llvm::DataLayout& DL,
    llvm::Instruction* ScanFrom = nullptr,
    const llvm::DominatorTree* DT = nullptr)

Description

Return true if we know that executing a load from this value cannot trap. If DT and ScanFrom are specified this method performs context-sensitive analysis and returns true if it is safe to load immediately before ScanFrom. If it is not obviously safe to load from the specified pointer, we do a quick local scan of the basic block containing ScanFrom, to determine if the address is already accessed.

Declared at: llvm/include/llvm/Analysis/Loads.h:62

Parameters

llvm::Value* V
llvm::MaybeAlign Alignment
llvm::APInt& Size
const llvm::DataLayout& DL
llvm::Instruction* ScanFrom = nullptr
const llvm::DominatorTree* DT = nullptr