LLVM  6.0.0svn
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"

Collaboration diagram for llvm::MemoryDepChecker::Dependence:
Collaboration graph
[legend]

Public Types

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

Public Member Functions

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

Static Public Member Functions

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

Public Attributes

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

Static Public Attributes

static const charDepName []
 String version of the types. More...
 

Detailed Description

Dependece between memory access instructions.

Definition at line 101 of file LoopAccessAnalysis.h.

Member Enumeration Documentation

◆ DepType

The type of the dependence.

Enumerator
NoDep 
Unknown 
Forward 
ForwardButPreventsForwarding 
Backward 
BackwardVectorizable 
BackwardVectorizableButPreventsForwarding 

Definition at line 103 of file LoopAccessAnalysis.h.

Constructor & Destructor Documentation

◆ Dependence()

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

Definition at line 140 of file LoopAccessAnalysis.h.

References llvm::Depth.

Member Function Documentation

◆ getDestination()

Instruction * llvm::MemoryDepChecker::Dependence::getDestination ( const LoopAccessInfo LAI) const
inline

Return the destination instruction of the dependence.

Definition at line 742 of file LoopAccessAnalysis.h.

References llvm::LoopAccessInfo::getDepChecker(), and llvm::MemoryDepChecker::getMemoryInstructions().

◆ getSource()

Instruction * llvm::MemoryDepChecker::Dependence::getSource ( const LoopAccessInfo LAI) const
inline

Return the source instruction of the dependence.

Definition at line 737 of file LoopAccessAnalysis.h.

References llvm::LoopAccessInfo::getDepChecker(), llvm::MemoryDepChecker::getMemoryInstructions(), and llvm::Sched::Source.

◆ isBackward()

bool MemoryDepChecker::Dependence::isBackward ( ) const

Lexically backward dependence.

Definition at line 1178 of file LoopAccessAnalysis.cpp.

References llvm_unreachable, and llvm::Unknown.

◆ isForward()

bool MemoryDepChecker::Dependence::isForward ( ) const

Lexically forward dependence.

Definition at line 1198 of file LoopAccessAnalysis.cpp.

References llvm::dbgs(), DEBUG, llvm_unreachable, and llvm::Unknown.

◆ isPossiblyBackward()

bool MemoryDepChecker::Dependence::isPossiblyBackward ( ) const

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

Definition at line 1194 of file LoopAccessAnalysis.cpp.

References llvm::Unknown.

◆ isSafeForVectorization()

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

Dependence types that don't prevent vectorization.

Definition at line 1162 of file LoopAccessAnalysis.cpp.

References llvm_unreachable, and llvm::Unknown.

◆ print()

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

Member Data Documentation

◆ DepName

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

String version of the types.

Definition at line 131 of file LoopAccessAnalysis.h.

Referenced by llvm::MemoryDepChecker::getInstructionsForAccess().

◆ Destination

unsigned llvm::MemoryDepChecker::Dependence::Destination

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

Definition at line 136 of file LoopAccessAnalysis.h.

◆ Source

unsigned llvm::MemoryDepChecker::Dependence::Source

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

Definition at line 134 of file LoopAccessAnalysis.h.

◆ Type

DepType llvm::MemoryDepChecker::Dependence::Type

The type of the dependence.

Definition at line 138 of file LoopAccessAnalysis.h.


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