class RuntimePointerChecking

Declaration

class RuntimePointerChecking { /* full declaration omitted */ };

Description

Holds information about the memory runtime legality checks to verify that a group of pointers do not overlap.

Declared at: llvm/include/llvm/Analysis/LoopAccessAnalysis.h:334

Member Variables

public bool Need
This flag indicates if we need to add the runtime check.
public SmallVector< llvm::RuntimePointerChecking::PointerInfo, 2> Pointers
Information about the pointers that may require checking.
public SmallVector<llvm::RuntimePointerChecking:: CheckingPtrGroup, 2> CheckingGroups
Holds a partitioning of pointers into "check groups".

Method Overview

  • public RuntimePointerChecking(llvm::ScalarEvolution * SE)
  • public static bool arePointersInSamePartition(const SmallVectorImpl<int> & PtrToPartition, unsigned int PtrIdx1, unsigned int PtrIdx2)
  • public bool empty() const
  • public void generateChecks(MemoryDepChecker::DepCandidates & DepCands, bool UseDependencies)
  • public const SmallVector<llvm::RuntimePointerChecking::PointerCheck, 4> & getChecks() const
  • public unsigned int getNumberOfChecks() const
  • public const llvm::RuntimePointerChecking::PointerInfo & getPointerInfo(unsigned int PtrIdx) const
  • public void insert(llvm::Loop * Lp, llvm::Value * Ptr, bool WritePtr, unsigned int DepSetId, unsigned int ASId, const llvm::ValueToValueMap & Strides, llvm::PredicatedScalarEvolution & PSE)
  • public bool needsChecking(const llvm::RuntimePointerChecking::CheckingPtrGroup & M, const llvm::RuntimePointerChecking::CheckingPtrGroup & N) const
  • public bool needsChecking(unsigned int I, unsigned int J) const
  • public void print(llvm::raw_ostream & OS, unsigned int Depth = 0) const
  • public void printChecks(llvm::raw_ostream & OS, const SmallVectorImpl<llvm::RuntimePointerChecking::PointerCheck> & Checks, unsigned int Depth = 0) const
  • public void reset()

Methods

RuntimePointerChecking(llvm::ScalarEvolution* SE)

Declared at: llvm/include/llvm/Analysis/LoopAccessAnalysis.h:363

Parameters

llvm::ScalarEvolution* SE

static bool arePointersInSamePartition(
    const SmallVectorImpl<int>& PtrToPartition,
    unsigned int PtrIdx1,
    unsigned int PtrIdx2)

Description

Check if pointers are in the same partition \p PtrToPartition contains the partition number for pointers (-1 if the pointer belongs to multiple partitions).

Declared at: llvm/include/llvm/Analysis/LoopAccessAnalysis.h:463

Parameters

const SmallVectorImpl<int>& PtrToPartition
unsigned int PtrIdx1
unsigned int PtrIdx2

bool empty() const

Description

No run-time memory checking is necessary.

Declared at: llvm/include/llvm/Analysis/LoopAccessAnalysis.h:382

void generateChecks(
    MemoryDepChecker::DepCandidates& DepCands,
    bool UseDependencies)

Description

Generate the checks and store it. This also performs the grouping of pointers to reduce the number of memchecks necessary.

Declared at: llvm/include/llvm/Analysis/LoopAccessAnalysis.h:427

Parameters

MemoryDepChecker::DepCandidates& DepCands
bool UseDependencies

const SmallVector<
    llvm::RuntimePointerChecking::PointerCheck,
    4>&
getChecks() const

Description

Returns the checks that generateChecks created.

Declared at: llvm/include/llvm/Analysis/LoopAccessAnalysis.h:431

unsigned int getNumberOfChecks() const

Description

Returns the number of run-time checks required according to needsChecking.

Declared at: llvm/include/llvm/Analysis/LoopAccessAnalysis.h:440

const llvm::RuntimePointerChecking::PointerInfo&
getPointerInfo(unsigned int PtrIdx) const

Description

Return PointerInfo for pointer at index \p PtrIdx.

Declared at: llvm/include/llvm/Analysis/LoopAccessAnalysis.h:471

Parameters

unsigned int PtrIdx

void insert(llvm::Loop* Lp,
            llvm::Value* Ptr,
            bool WritePtr,
            unsigned int DepSetId,
            unsigned int ASId,
            const llvm::ValueToValueMap& Strides,
            llvm::PredicatedScalarEvolution& PSE)

Description

Insert a pointer and calculate the start and end SCEVs. We need \p PSE in order to compute the SCEV expression of the pointer according to the assumptions that we've made during the analysis. The method might also version the pointer stride according to \p Strides, and add new predicates to \p PSE.

Declared at: llvm/include/llvm/Analysis/LoopAccessAnalysis.h:377

Parameters

llvm::Loop* Lp
llvm::Value* Ptr
bool WritePtr
unsigned int DepSetId
unsigned int ASId
const llvm::ValueToValueMap& Strides
llvm::PredicatedScalarEvolution& PSE

bool needsChecking(
    const llvm::RuntimePointerChecking::
        CheckingPtrGroup& M,
    const llvm::RuntimePointerChecking::
        CheckingPtrGroup& N) const

Description

Decide if we need to add a check between two groups of pointers, according to needsChecking.

Declared at: llvm/include/llvm/Analysis/LoopAccessAnalysis.h:435

Parameters

const llvm::RuntimePointerChecking:: CheckingPtrGroup& M
const llvm::RuntimePointerChecking:: CheckingPtrGroup& N

bool needsChecking(unsigned int I,
                   unsigned int J) const

Description

Decide whether we need to issue a run-time check for pointer at index \p I and \p J to prove their independence.

Declared at: llvm/include/llvm/Analysis/LoopAccessAnalysis.h:468

Parameters

unsigned int I
unsigned int J

void print(llvm::raw_ostream& OS,
           unsigned int Depth = 0) const

Description

Print the list run-time memory checks necessary.

Declared at: llvm/include/llvm/Analysis/LoopAccessAnalysis.h:443

Parameters

llvm::raw_ostream& OS
unsigned int Depth = 0

void printChecks(
    llvm::raw_ostream& OS,
    const SmallVectorImpl<
        llvm::RuntimePointerChecking::
            PointerCheck>& Checks,
    unsigned int Depth = 0) const

Description

Print \p Checks.

Declared at: llvm/include/llvm/Analysis/LoopAccessAnalysis.h:446

Parameters

llvm::raw_ostream& OS
const SmallVectorImpl< llvm::RuntimePointerChecking::PointerCheck>& Checks
unsigned int Depth = 0

void reset()

Description

Reset the state of the pointer runtime information.

Declared at: llvm/include/llvm/Analysis/LoopAccessAnalysis.h:366