Thanks to visit codestin.com
Credit goes to llvm.org

LLVM 22.0.0git
llvm::FullDependence Class Referencefinal

FullDependence - This class represents a dependence between two memory references in a function. More...

#include "llvm/Analysis/DependenceAnalysis.h"

Inheritance diagram for llvm::FullDependence:
[legend]

Public Member Functions

 FullDependence (Instruction *Source, Instruction *Destination, const SCEVUnionPredicate &Assumes, bool PossiblyLoopIndependent, unsigned Levels)
bool isLoopIndependent () const override
 isLoopIndependent - Returns true if this is a loop-independent dependence.
bool isConfused () const override
 isConfused - Returns true if this dependence is confused (the compiler understands nothing and makes worst-case assumptions).
bool isConsistent () const override
 isConsistent - Returns true if this dependence is consistent (occurs every time the source and destination are executed).
unsigned getLevels () const override
 getLevels - Returns the number of common loops surrounding the source and destination of the dependence.
unsigned getSameSDLevels () const override
 getSameSDLevels - Returns the number of separate SameSD loops surrounding the source and destination of the dependence.
DVEntry getDVEntry (unsigned Level, bool isSameSD) const
 getDVEntry - Returns the DV entry associated with a regular or a SameSD level.
unsigned getDirection (unsigned Level, bool SameSD=false) const override
 getDirection - Returns the direction associated with a particular common or SameSD level.
const SCEVgetDistance (unsigned Level, bool SameSD=false) const override
 getDistance - Returns the distance (or NULL) associated with a particular common or SameSD level.
bool isDirectionNegative () const override
 Check if the direction vector is negative.
bool normalize (ScalarEvolution *SE) override
 If the direction vector is negative, normalize the direction vector to make it non-negative.
bool isPeelFirst (unsigned Level, bool SameSD=false) const override
 isPeelFirst - Returns true if peeling the first iteration from this regular or SameSD loop level will break this dependence.
bool isPeelLast (unsigned Level, bool SameSD=false) const override
 isPeelLast - Returns true if peeling the last iteration from this regular or SameSD loop level will break this dependence.
bool isSplitable (unsigned Level, bool SameSD=false) const override
 isSplitable - Returns true if splitting the loop will break the dependence.
bool inSameSDLoops (unsigned Level) const override
 inSameSDLoops - Returns true if this level is an SameSD level, i.e., performed across two separate loop nests that have the Same Iteration and Depth.
bool isScalar (unsigned Level, bool SameSD=false) const override
 isScalar - Returns true if a particular regular or SameSD level is scalar; that is, if no subscript in the source or destination mention the induction variable associated with the loop at this level.
Public Member Functions inherited from llvm::Dependence
 Dependence (Instruction *Source, Instruction *Destination, const SCEVUnionPredicate &A)
virtual ~Dependence ()=default
InstructiongetSrc () const
 getSrc - Returns the source instruction for this dependence.
InstructiongetDst () const
 getDst - Returns the destination instruction for this dependence.
bool isInput () const
 isInput - Returns true if this is an input dependence.
bool isOutput () const
 isOutput - Returns true if this is an output dependence.
bool isFlow () const
 isFlow - Returns true if this is a flow (aka true) dependence.
bool isAnti () const
 isAnti - Returns true if this is an anti dependence.
bool isOrdered () const
 isOrdered - Returns true if dependence is Output, Flow, or Anti
bool isUnordered () const
 isUnordered - Returns true if dependence is Input
DVEntry getDVEntry (unsigned Level, bool isSameSD) const
 getDVEntry - Returns the DV entry associated with a regular or a SameSD level
const DependencegetNextPredecessor () const
 getNextPredecessor - Returns the value of the NextPredecessor field.
const DependencegetNextSuccessor () const
 getNextSuccessor - Returns the value of the NextSuccessor field.
void setNextPredecessor (const Dependence *pred)
 setNextPredecessor - Sets the value of the NextPredecessor field.
void setNextSuccessor (const Dependence *succ)
 setNextSuccessor - Sets the value of the NextSuccessor field.
SCEVUnionPredicate getRuntimeAssumptions () const
 getRuntimeAssumptions - Returns the runtime assumptions under which this Dependence relation is valid.
void dump (raw_ostream &OS) const
 dump - For debugging purposes, dumps a dependence to OS.
void dumpImp (raw_ostream &OS, bool SameSD=false) const
 dumpImp - For debugging purposes.

Friends

class DependenceInfo

Additional Inherited Members

Protected Member Functions inherited from llvm::Dependence
 Dependence (Dependence &&)=default
Dependenceoperator= (Dependence &&)=default
Protected Attributes inherited from llvm::Dependence
InstructionSrc
InstructionDst

Detailed Description

FullDependence - This class represents a dependence between two memory references in a function.

It contains detailed information about the dependence (direction vectors, etc.) and is used when the compiler is able to accurately analyze the interaction of the references; that is, it is not a confused dependence (see Dependence). In most cases (for output, flow, and anti dependences), the dependence implies an ordering, where the source must precede the destination; in contrast, input dependences are unordered.

Definition at line 256 of file DependenceAnalysis.h.

Constructor & Destructor Documentation

◆ FullDependence()

FullDependence::FullDependence ( Instruction * Source,
Instruction * Destination,
const SCEVUnionPredicate & Assumes,
bool PossiblyLoopIndependent,
unsigned Levels )

Definition at line 283 of file DependenceAnalysis.cpp.

References llvm::Dependence::Dependence().

Member Function Documentation

◆ getDirection()

unsigned FullDependence::getDirection ( unsigned Level,
bool SameSD = false ) const
overridevirtual

getDirection - Returns the direction associated with a particular common or SameSD level.

Reimplemented from llvm::Dependence.

Definition at line 354 of file DependenceAnalysis.cpp.

References llvm::Dependence::DVEntry::Direction, and getDVEntry().

◆ getDistance()

const SCEV * FullDependence::getDistance ( unsigned Level,
bool SameSD = false ) const
overridevirtual

getDistance - Returns the distance (or NULL) associated with a particular common or SameSD level.

Reimplemented from llvm::Dependence.

Definition at line 360 of file DependenceAnalysis.cpp.

References llvm::Dependence::DVEntry::Distance, and getDVEntry().

◆ getDVEntry()

DVEntry llvm::FullDependence::getDVEntry ( unsigned Level,
bool isSameSD ) const
inline

getDVEntry - Returns the DV entry associated with a regular or a SameSD level.

Definition at line 285 of file DependenceAnalysis.h.

References assert().

Referenced by getDirection(), getDistance(), isPeelFirst(), isPeelLast(), isScalar(), and isSplitable().

◆ getLevels()

unsigned llvm::FullDependence::getLevels ( ) const
inlineoverridevirtual

getLevels - Returns the number of common loops surrounding the source and destination of the dependence.

Reimplemented from llvm::Dependence.

Definition at line 277 of file DependenceAnalysis.h.

◆ getSameSDLevels()

unsigned llvm::FullDependence::getSameSDLevels ( ) const
inlineoverridevirtual

getSameSDLevels - Returns the number of separate SameSD loops surrounding the source and destination of the dependence.

Reimplemented from llvm::Dependence.

Definition at line 281 of file DependenceAnalysis.h.

◆ inSameSDLoops()

bool FullDependence::inSameSDLoops ( unsigned Level) const
overridevirtual

inSameSDLoops - Returns true if this level is an SameSD level, i.e., performed across two separate loop nests that have the Same Iteration and Depth.

Reimplemented from llvm::Dependence.

Definition at line 391 of file DependenceAnalysis.cpp.

References assert().

◆ isConfused()

bool llvm::FullDependence::isConfused ( ) const
inlineoverridevirtual

isConfused - Returns true if this dependence is confused (the compiler understands nothing and makes worst-case assumptions).

Reimplemented from llvm::Dependence.

Definition at line 269 of file DependenceAnalysis.h.

◆ isConsistent()

bool llvm::FullDependence::isConsistent ( ) const
inlineoverridevirtual

isConsistent - Returns true if this dependence is consistent (occurs every time the source and destination are executed).

Reimplemented from llvm::Dependence.

Definition at line 273 of file DependenceAnalysis.h.

◆ isDirectionNegative()

bool FullDependence::isDirectionNegative ( ) const
overridevirtual

Check if the direction vector is negative.

A negative direction vector means Src and Dst are reversed in the actual program.

Reimplemented from llvm::Dependence.

Definition at line 310 of file DependenceAnalysis.cpp.

References llvm::Dependence::DVEntry::EQ, llvm::Dependence::DVEntry::GE, and llvm::Dependence::DVEntry::GT.

Referenced by normalize().

◆ isLoopIndependent()

bool llvm::FullDependence::isLoopIndependent ( ) const
inlineoverridevirtual

isLoopIndependent - Returns true if this is a loop-independent dependence.

Reimplemented from llvm::Dependence.

Definition at line 264 of file DependenceAnalysis.h.

◆ isPeelFirst()

bool FullDependence::isPeelFirst ( unsigned Level,
bool SameSD = false ) const
overridevirtual

isPeelFirst - Returns true if peeling the first iteration from this regular or SameSD loop level will break this dependence.

Reimplemented from llvm::Dependence.

Definition at line 373 of file DependenceAnalysis.cpp.

References getDVEntry(), and llvm::Dependence::DVEntry::PeelFirst.

◆ isPeelLast()

bool FullDependence::isPeelLast ( unsigned Level,
bool SameSD = false ) const
overridevirtual

isPeelLast - Returns true if peeling the last iteration from this regular or SameSD loop level will break this dependence.

Reimplemented from llvm::Dependence.

Definition at line 379 of file DependenceAnalysis.cpp.

References getDVEntry(), and llvm::Dependence::DVEntry::PeelLast.

◆ isScalar()

bool FullDependence::isScalar ( unsigned Level,
bool SameSD = false ) const
overridevirtual

isScalar - Returns true if a particular regular or SameSD level is scalar; that is, if no subscript in the source or destination mention the induction variable associated with the loop at this level.

Reimplemented from llvm::Dependence.

Definition at line 367 of file DependenceAnalysis.cpp.

References getDVEntry(), and llvm::Dependence::DVEntry::Scalar.

◆ isSplitable()

bool FullDependence::isSplitable ( unsigned Level,
bool SameSD = false ) const
overridevirtual

isSplitable - Returns true if splitting the loop will break the dependence.

Reimplemented from llvm::Dependence.

Definition at line 384 of file DependenceAnalysis.cpp.

References getDVEntry(), and llvm::Dependence::DVEntry::Splitable.

◆ normalize()

bool FullDependence::normalize ( ScalarEvolution * SE)
overridevirtual

If the direction vector is negative, normalize the direction vector to make it non-negative.

Normalization is done by reversing Src and Dst, plus reversing the dependence directions and distances in the vector.

Reimplemented from llvm::Dependence.

Definition at line 323 of file DependenceAnalysis.cpp.

References llvm::dbgs(), llvm::Dependence::Dst, llvm::Dependence::dump(), llvm::Dependence::DVEntry::EQ, llvm::ScalarEvolution::getNegativeSCEV(), llvm::Dependence::DVEntry::GT, isDirectionNegative(), LLVM_DEBUG, llvm::Dependence::DVEntry::LT, llvm::Dependence::Src, and std::swap().

◆ DependenceInfo

friend class DependenceInfo
friend

Definition at line 344 of file DependenceAnalysis.h.

References DependenceInfo.

Referenced by DependenceInfo.


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