LLVM  14.0.0git
Public Member Functions | Public Attributes | List of all members
Prefetch Struct Reference

A record for a potential prefetch made during the initial scan of the loop. More...

Collaboration diagram for Prefetch:
Collaboration graph
[legend]

Public Member Functions

 Prefetch (const SCEVAddRecExpr *L, Instruction *I)
 Constructor to create a new Prefetch for I. More...
 
void addInstruction (Instruction *I, DominatorTree *DT=nullptr, int64_t PtrDiff=0)
 Add the instruction. More...
 

Public Attributes

const SCEVAddRecExprLSCEVAddRec
 The address formula for this prefetch as returned by ScalarEvolution. More...
 
InstructionInsertPt
 The point of insertion for the prefetch instruction. More...
 
bool Writes
 True if targeting a write memory access. More...
 
InstructionMemI
 The (first seen) prefetched instruction. More...
 

Detailed Description

A record for a potential prefetch made during the initial scan of the loop.

This is used to let a single prefetch target multiple memory accesses.

Definition at line 235 of file LoopDataPrefetch.cpp.

Constructor & Destructor Documentation

◆ Prefetch()

Prefetch::Prefetch ( const SCEVAddRecExpr L,
Instruction I 
)
inline

Constructor to create a new Prefetch for I.

Definition at line 246 of file LoopDataPrefetch.cpp.

References I.

Member Function Documentation

◆ addInstruction()

void Prefetch::addInstruction ( Instruction I,
DominatorTree DT = nullptr,
int64_t  PtrDiff = 0 
)
inline

Add the instruction.

Parameters
Ito this prefetch. If it's not the first one, 'InsertPt' and 'Writes' will be updated as required.
PtrDiffthe known constant address difference to the first added instruction.

Definition at line 255 of file LoopDataPrefetch.cpp.

References llvm::DominatorTreeBase< NodeT, IsPostDom >::findNearestCommonDominator(), llvm::Instruction::getParent(), llvm::BasicBlock::getTerminator(), and I.

Member Data Documentation

◆ InsertPt

Instruction* Prefetch::InsertPt

The point of insertion for the prefetch instruction.

Definition at line 239 of file LoopDataPrefetch.cpp.

◆ LSCEVAddRec

const SCEVAddRecExpr* Prefetch::LSCEVAddRec

The address formula for this prefetch as returned by ScalarEvolution.

Definition at line 237 of file LoopDataPrefetch.cpp.

◆ MemI

Instruction* Prefetch::MemI

The (first seen) prefetched instruction.

Definition at line 243 of file LoopDataPrefetch.cpp.

◆ Writes

bool Prefetch::Writes

True if targeting a write memory access.

Definition at line 241 of file LoopDataPrefetch.cpp.


The documentation for this struct was generated from the following file: