LLVM 20.0.0git
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
llvm::MemoryDepChecker::Dependence Struct Reference

Dependece between memory access instructions. More...

#include "llvm/Analysis/LoopAccessAnalysis.h"

Public Types

enum  DepType {
  NoDep , Unknown , IndirectUnsafe , Forward ,
  ForwardButPreventsForwarding , Backward , BackwardVectorizable , BackwardVectorizableButPreventsForwarding
}
 The type of the dependence. More...
 

Public Member Functions

 Dependence (unsigned Source, unsigned Destination, DepType Type)
 
InstructiongetSource (const MemoryDepChecker &DepChecker) const
 Return the source instruction of the dependence.
 
InstructiongetDestination (const MemoryDepChecker &DepChecker) const
 Return the destination instruction of the dependence.
 
bool isForward () const
 Lexically forward dependence.
 
bool isBackward () const
 Lexically backward dependence.
 
bool isPossiblyBackward () const
 May be a lexically backward dependence type (includes Unknown).
 
void print (raw_ostream &OS, unsigned Depth, const SmallVectorImpl< Instruction * > &Instrs) const
 Print the dependence.
 

Static Public Member Functions

static VectorizationSafetyStatus isSafeForVectorization (DepType Type)
 Dependence types that don't prevent vectorization.
 

Public Attributes

unsigned Source
 Index of the source of the dependence in the InstMap vector.
 
unsigned Destination
 Index of the destination of the dependence in the InstMap vector.
 
DepType Type
 The type of the dependence.
 

Static Public Attributes

static const charDepName []
 String version of the types.
 

Detailed Description

Dependece between memory access instructions.

Definition at line 111 of file LoopAccessAnalysis.h.

Member Enumeration Documentation

◆ DepType

The type of the dependence.

Enumerator
NoDep 
Unknown 
IndirectUnsafe 
Forward 
ForwardButPreventsForwarding 
Backward 
BackwardVectorizable 
BackwardVectorizableButPreventsForwarding 

Definition at line 113 of file LoopAccessAnalysis.h.

Constructor & Destructor Documentation

◆ Dependence()

llvm::MemoryDepChecker::Dependence::Dependence ( unsigned  Source,
unsigned  Destination,
DepType  Type 
)
inline

Definition at line 156 of file LoopAccessAnalysis.h.

Member Function Documentation

◆ getDestination()

Instruction * llvm::MemoryDepChecker::Dependence::getDestination ( const MemoryDepChecker DepChecker) const
inline

Return the destination instruction of the dependence.

Definition at line 895 of file LoopAccessAnalysis.h.

References llvm::MemoryDepChecker::getMemoryInstructions().

◆ getSource()

Instruction * llvm::MemoryDepChecker::Dependence::getSource ( const MemoryDepChecker DepChecker) const
inline

Return the source instruction of the dependence.

Definition at line 890 of file LoopAccessAnalysis.h.

References llvm::MemoryDepChecker::getMemoryInstructions(), and Source.

◆ isBackward()

bool MemoryDepChecker::Dependence::isBackward ( ) const

Lexically backward dependence.

Definition at line 1701 of file LoopAccessAnalysis.cpp.

References llvm_unreachable, and llvm::Unknown.

◆ isForward()

bool MemoryDepChecker::Dependence::isForward ( ) const

Lexically forward dependence.

Definition at line 1722 of file LoopAccessAnalysis.cpp.

References llvm_unreachable, and llvm::Unknown.

◆ isPossiblyBackward()

bool MemoryDepChecker::Dependence::isPossiblyBackward ( ) const

May be a lexically backward dependence type (includes Unknown).

Definition at line 1718 of file LoopAccessAnalysis.cpp.

References llvm::Unknown.

◆ isSafeForVectorization()

MemoryDepChecker::VectorizationSafetyStatus MemoryDepChecker::Dependence::isSafeForVectorization ( DepType  Type)
static

◆ print()

void MemoryDepChecker::Dependence::print ( raw_ostream OS,
unsigned  Depth,
const SmallVectorImpl< Instruction * > &  Instrs 
) const

Print the dependence.

Instr is used to map the instruction indices to instructions.

Definition at line 2342 of file LoopAccessAnalysis.cpp.

References llvm::Depth, llvm::raw_ostream::indent(), and OS.

Referenced by llvm::LoopAccessInfo::print().

Member Data Documentation

◆ DepName

const char * MemoryDepChecker::Dependence::DepName
static
Initial value:
= {
"NoDep",
"Unknown",
"IndirectUnsafe",
"Forward",
"ForwardButPreventsForwarding",
"Backward",
"BackwardVectorizable",
"BackwardVectorizableButPreventsForwarding"}

String version of the types.

Definition at line 147 of file LoopAccessAnalysis.h.

◆ Destination

unsigned llvm::MemoryDepChecker::Dependence::Destination

Index of the destination of the dependence in the InstMap vector.

Definition at line 152 of file LoopAccessAnalysis.h.

◆ Source

unsigned llvm::MemoryDepChecker::Dependence::Source

Index of the source of the dependence in the InstMap vector.

Definition at line 150 of file LoopAccessAnalysis.h.

Referenced by getSource().

◆ Type

DepType llvm::MemoryDepChecker::Dependence::Type

The type of the dependence.

Definition at line 154 of file LoopAccessAnalysis.h.


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